LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-13-2024, 12:49 PM   #31
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5

It seems like using single command with -R is only way to do it in Bash. I guess it is similar but can you do it in a script? X E.
 
Old 01-13-2024, 12:51 PM   #32
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Of course not. I get a feeling you worry too much...
 
1 members found this post helpful.
Old 01-13-2024, 12:53 PM   #33
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
It is a low level Linux debugger, being careful is better than being with a toast computer. Better safe than sorry as that old saying goes. Would you like me to try to write a script for you?
 
Old 01-13-2024, 01:03 PM   #34
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Quote:
Originally Posted by maybeJosiah View Post
Would you like me to try to write a script for you?
No, thanks. Just wait to get a USB stick and try it yourself.
 
Old 01-13-2024, 01:04 PM   #35
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Okay, thanks. X E.
 
Old 01-13-2024, 04:42 PM   #36
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Just to be clear, something like "sudo mount debugfs /dev/sdXN" to start and then I can access stuff in debugfs then like that previous command but "u" in front of "mount"? I read man debugfs but there is little about this. Did you just do without mount or not? X E.
 
Old 01-13-2024, 04:52 PM   #37
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I can't find anything that says otherwise and I debugfs man page it looked like no mount so unless I hear otherwise, unmounted and stayed unmounted. X E.
 
Old 01-14-2024, 03:47 AM   #38
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Yes, the file system which you are editing should be unmounted. The 'debugfs' command accesses the disk directly.

If the fs were mounted, the OS would have an inode cache in RAM, and it would have different content than the disk if you access the disk directly using debugfs. The worst thing to do would be, for example, mixing 'touch' commands going via the OS and 'debugfs' commands going directly to the disk bypassing the inode cache. It would probably not do anything bad to your fs but at least you couldn't take it granted that all the time stamps were finally what you wanted.
 
1 members found this post helpful.
Old 01-14-2024, 03:57 AM   #39
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Quote:
Originally Posted by maybeJosiah View Post
Just to be clear, something like "sudo mount debugfs /dev/sdXN" to start and then I can access stuff in debugfs then like that previous command but "u" in front of "mount"? I read man debugfs but there is little about this. Did you just do without mount or not? X E.
Mounting debugfs sounds again like confusing apples the fruits with Apple the computer company.

Nothing to do with editing ext4 file systems with command "debugfs", there is a virtual file system also called "debugfs". It can be mounted at /sys/kernel/debug. For example, if the kernel is built preemptible, you can control that:

Code:
root@acer:~ # mount -t debugfs none /sys/kernel/debug
root@acer:~ # cat /sys/kernel/debug/sched/preempt
none (voluntary) full 
root@acer:~ # echo none > /sys/kernel/debug/sched/preempt
root@acer:~ # cat /sys/kernel/debug/sched/preempt
(none) voluntary full

Last edited by Petri Kaukasoina; 01-14-2024 at 04:49 AM.
 
Old 01-14-2024, 09:01 AM   #40
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Okay so use debugfs command only, no mount... command before. Thanks. X E.
 
Old 01-14-2024, 10:14 AM   #41
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Word from Theodore Ts'o, that way you tried is way to set only for before resetting year. May post more as it comes. X E.
 
Old 01-15-2024, 04:01 AM   #42
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
Quote:
Originally Posted by maybeJosiah View Post
Word from Theodore Ts'o, that way you tried is way to set only for before resetting year.
I guess you mean this what michaelk already told you:

Quote:
Originally Posted by michaelk View Post
At bit out of date but should be valid for what you seek.

https://ext4.wiki.kernel.org/index.p...ut#Inode_Table
Quote:
Originally Posted by michaelk View Post
It looks a bit more complicated with the extra bits for years>2038.
If you looked at the link he provided you saw this table: https://ext4.wiki.kernel.org/index.p...ode_Timestamps. The change will be after 2038-01-19 03:14:07 UTC when all the aeroplanes will also fall down and the banks will lose all the money.

Last edited by Petri Kaukasoina; 01-15-2024 at 04:17 AM.
 
1 members found this post helpful.
Old 01-15-2024, 08:02 AM   #43
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Okay so that change should stay after 2038. With that like my programs are complete but not with restore tested yet. Mr. Ts'o to me seemed to be like maybe they would not stay but stayed ambiguous about it thus far. Not contradicting you but now I am unsure why Mr. Ts'o is how He is in messages. I agree with you based on like my research. There may be an i_ or not i_ to set though so have to work with that. X E.
 
  


Reply

Tags
bash, timestamp, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Google search will log and search for later. Including site tracking *including site check, copyrights,... and removing sites Xeratul General 7 11-01-2023 05:17 PM
Logi Sales Manager on Ncurses (invoice, invoicing, orders, order, sale order, sales order...)? Xeratul Linux - Software 0 03-25-2017 02:45 PM
How to restore deleted inodes using debugfs willsam100 Linux - General 7 08-20-2011 05:33 AM
batch commands to debugfs with a read-only filesystem billhowe Red Hat 1 08-21-2004 11:02 AM
Using undel command in debugfs chii-chan Linux - Newbie 6 03-01-2004 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration