[opensuse] Using e2fsck in, eg, Leap 15.0
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3). To do this, one first issued (as root) the command: init 1 followed by mount -o remount, ro /dev/hdXY and then issuing: e2fsck /dev/hdXY (preferably) without any parameters. Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore. What is the new way, please if anyone knows, to check the status of the ext4 file system? BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-19 08:28, Basil Chupin wrote:
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3).
To do this, one first issued (as root) the command:
init 1
followed by
mount -o remount, ro /dev/hdXY
and then issuing:
e2fsck /dev/hdXY
(preferably) without any parameters.
Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore.
What is the new way, please if anyone knows, to check the status of the ext4 file system?
You mean that you want to check the "/" filesystem, the same one that is running. Well, I simply don't do that. I boot from another partition, and if there is none, I boot a rescue stick. Then, I fsck without tricks. A possibility is to flag the filesystem as dirty, creating a certain empty file on "/", then reboot. But I don't remember the exact name, nor do I know if it works with systemd. It did with init.d, and I could simply read the scripts to find out its name. Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 19/08/18 17:23, ellanios82 wrote:
On 19/08/18 09:28, Basil Chupin wrote:
to check the status of the ext4 file system?
- what i do :
fsck.ext4 -f /dev/sdc1
Thank you, but you mean that you simply run the above without unmounting the partition? The man (for e2fsck) states- <quote> If e2fsck asks whether or not you should check a filesystem which is mounted, the only correct answer is ``no''. </quote> BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/08/18 21:43, Carlos E. R. wrote:
On 2018-08-19 08:28, Basil Chupin wrote:
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3).
To do this, one first issued (as root) the command:
init 1
followed by
mount -o remount, ro /dev/hdXY
and then issuing:
e2fsck /dev/hdXY
(preferably) without any parameters.
Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore.
What is the new way, please if anyone knows, to check the status of the ext4 file system? You mean that you want to check the "/" filesystem, the same one that is running.
Well, I simply don't do that. I boot from another partition, and if there is none, I boot a rescue stick. Then, I fsck without tricks.
A possibility is to flag the filesystem as dirty, creating a certain empty file on "/", then reboot. But I don't remember the exact name, nor do I know if it works with systemd. It did with init.d, and I could simply read the scripts to find out its name.
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system.
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-). BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
On 2018-08-19 08:28, Basil Chupin wrote:
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3).
To do this, one first issued (as root) the command:
init 1
followed by
mount -o remount, ro /dev/hdXY
and then issuing:
e2fsck /dev/hdXY
(preferably) without any parameters.
Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore.
What is the new way, please if anyone knows, to check the status of the ext4 file system? You mean that you want to check the "/" filesystem, the same one that is running.
Well, I simply don't do that. I boot from another partition, and if there is none, I boot a rescue stick. Then, I fsck without tricks.
A possibility is to flag the filesystem as dirty, creating a certain empty file on "/", then reboot. But I don't remember the exact name, nor do I know if it works with systemd. It did with init.d, and I could simply read the scripts to find out its name.
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system.
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-).
Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 20/08/18 04:52, Basil Chupin wrote:
fsck.ext4 -f /dev/sdc1
Thank you, but you mean that you simply run the above without unmounting the partition?
- naturally : only run on UN-mounted partitions : else , : boot a live-system [say on usb stick] , enabling check on intended , now unmounted partitions ...... regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-20 03:57, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-).
It is trivial :-) Just download it, and copy to the stick just as you would copy the installation DVD. Same thing. Then boot it. The first time it runs (it can be slow) it creates an empty writeable partition in the remainder space of the stick, so that the system can write files there. It is even possible to install some packages there. Not really do updates, though. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 2018-08-20 04:08, Lew Wolfgang wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system.
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-).
Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time.
Yes, for this thing it suffices. But the full rescue image is way more powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc. Thus you can use, for instance, gparted :-) -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 20/08/18 16:29, ellanios82 wrote:
On 20/08/18 04:52, Basil Chupin wrote:
fsck.ext4 -f /dev/sdc1
Thank you, but you mean that you simply run the above without unmounting the partition?
- naturally : only run on UN-mounted partitions :
Yes, but... this is one part of the Q I asked: How does one now "unmount" the partition to be able to execute e2fsck? I wrote that after issuing the command 'init 1' one then issued 'mount -o remount,ro /dev/hdXY' to unmount the partition and then remount it in read-only mode. What is the command now because the above one does not work with systemd?
else ,
: boot a live-system [say on usb stick] , enabling check on intended , now unmounted partitions
Been working on an usb stick since yesterday: tried to find on how to create such a bootable stick in the wiki but... however, after searching the web finally found https://en.opensuse.org/SDB:Live_USB_stick, used Image Writer... Will now start all over again and create that stick or bust :-). BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 20/08/18 12:08, Lew Wolfgang wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3).
To do this, one first issued (as root) the command:
init 1
followed by
mount -o remount, ro /dev/hdXY
and then issuing:
e2fsck /dev/hdXY
(preferably) without any parameters.
Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore.
What is the new way, please if anyone knows, to check the status of the ext4 file system? You mean that you want to check the "/" filesystem, the same one
On 2018-08-19 08:28, Basil Chupin wrote: that is running.
Well, I simply don't do that. I boot from another partition, and if there is none, I boot a rescue stick. Then, I fsck without tricks.
A possibility is to flag the filesystem as dirty, creating a certain empty file on "/", then reboot. But I don't remember the exact name, nor do I know if it works with systemd. It did with init.d, and I could simply read the scripts to find out its name.
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system.
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-).
Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time.
Why simplify matters when more complex solutions exist? (I am attempting to create a rescue USB stick but if that fails I'll definitely use the DVD :-). But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.) BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 20/08/18 20:32, Carlos E. R. wrote:
On 2018-08-20 04:08, Lew Wolfgang wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system. Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-). Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Yes, for this thing it suffices. But the full rescue image is way more powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc.
Thus you can use, for instance, gparted :-)
Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not the Rescue System on the Leap 15 DVD?! BC -- There comes a time in the affairs of a man when he has to take the bull by the tail and face the situation. W C Fields -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-21 08:47, ellanios82 wrote:
On 21/08/18 07:16, Basil Chupin wrote:
how to create such a bootable stick
- like :
#dd if=[live-system.iso] of=[usb-stick-device] bs=16M && sync
dd if=[live-system.iso] of=[usb-stick-device] bs=16M oflag=direct sync Otherwise, the cache fills with 600MB of useless data making the computer slower while it writes the image. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 2018-08-21 07:01, Basil Chupin wrote:
On 20/08/18 20:32, Carlos E. R. wrote:
On 2018-08-20 04:08, Lew Wolfgang wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system. Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-). Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Yes, for this thing it suffices. But the full rescue image is way more powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc.
Thus you can use, for instance, gparted :-)
Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not the Rescue System on the Leap 15 DVD?!
None of those. I'm talking about the openSUSE rescue CD:
aria2c "http://download.opensuse.org/distribution/leap/15.0/live/openSUSE-Leap-15.0-..."
I thought it was obvious :-) -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 2018-08-21 06:25, Basil Chupin wrote:
On 20/08/18 12:08, Lew Wolfgang wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote:
Many moons ago, when nobody ever walked into a lamp post while staring into a smartphone, one could check the status of the ext4 file system where oS was installed (as a for instance, /dev/hda3).
To do this, one first issued (as root) the command:
init 1
followed by
mount -o remount, ro /dev/hdXY
and then issuing:
e2fsck /dev/hdXY
(preferably) without any parameters.
Now, I see that 'e2fsck /dev/hdXY' (man e2fsck) this command is still available and effective but the 'mount -o...' command does not 'work' anymore.
What is the new way, please if anyone knows, to check the status of the ext4 file system? You mean that you want to check the "/" filesystem, the same one
On 2018-08-19 08:28, Basil Chupin wrote: that is running.
Well, I simply don't do that. I boot from another partition, and if there is none, I boot a rescue stick. Then, I fsck without tricks.
A possibility is to flag the filesystem as dirty, creating a certain empty file on "/", then reboot. But I don't remember the exact name, nor do I know if it works with systemd. It did with init.d, and I could simply read the scripts to find out its name.
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system.
Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-).
Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time.
Why simplify matters when more complex solutions exist?
(I am attempting to create a rescue USB stick but if that fails I'll definitely use the DVD :-).
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Try to do that in the default btrfs system, and good luck >:-P -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command. You wrote initially "it doesn't work" - exactly what happens? I tried it on a running system and of course it says: office38:~ # mount -o remount,ro / mount: /: mount point is busy. What happens when you've done "init 1" and you try the remount? -- Per Jessen, Zürich (23.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried.
Just tried it, you're right. Boot up into single user mode, and it works though. -- Per Jessen, Zürich (26.5°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried.
Just tried it, you're right.
Boot up into single user mode, and it works though.
What level is "single user mode"? :-? I thought that was "init 1". -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried.
Just tried it, you're right.
Boot up into single user mode, and it works though.
What level is "single user mode"? :-?
I thought that was "init 1".
I boot up with "init S". I have never used "init 1". see "man init", Looks like S and 1 are the same on systemd. -- Per Jessen, Zürich (27.0°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Per Jessen
I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd.
and they were before systemd. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Patrick Shanahan wrote:
* Per Jessen
[08-21-18 08:06]: [...] I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd.
and they were before systemd.
Not according to "man init" - 0,1,2,3,4,5 or 6 tell init to switch to the specified run level. Q or q tell init to re-examine the /etc/inittab file. S or s tell init to switch to single user mode. U or u tell init to re-execute itself Runlevels 1 and S on openSUSE 11.4: (quite similar): # l /etc/init.d/rc1.d/ total 12 drwxr-xr-x 2 root root 4096 Jul 15 2014 ./ drwxr-xr-x 11 root root 4096 Dec 6 2017 ../ lrwxrwxrwx 1 root root 8 Apr 25 2011 S01fbset -> ../fbset* lrwxrwxrwx 1 root root 6 Apr 25 2011 S06kbd -> ../kbd* lrwxrwxrwx 1 root root 10 Jul 15 2014 S07apcupsd -> ../apcupsd* lrwxrwxrwx 1 root root 9 Jul 15 2014 S08single -> ../single* # l /etc/init.d/rcS.d/ total 8 drwxr-xr-x 2 root root 88 Jul 15 2014 ./ drwxr-xr-x 11 root root 4096 Dec 6 2017 ../ lrwxrwxrwx 1 root root 13 Apr 25 2011 S03boot.clock -> ../boot.clock* lrwxrwxrwx 1 root root 6 Apr 25 2011 S06kbd -> ../kbd* lrwxrwxrwx 1 root root 9 Jul 15 2014 S08single -> ../single* -- Per Jessen, Zürich (29.6°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-21 14:06, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried.
Just tried it, you're right.
Boot up into single user mode, and it works though.
What level is "single user mode"? :-?
I thought that was "init 1".
I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd.
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2018-08-21 14:06, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote:
Basil Chupin wrote:
> But the simplest way in the past was to do what I wrote in my > opening post. And if only someone could tell me what now > replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.)
Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
IIRC, same thing. Busy. Long time since I last tried.
Just tried it, you're right.
Boot up into single user mode, and it works though.
What level is "single user mode"? :-?
I thought that was "init 1".
I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd.
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
According to the man page, they are. (man init). Maybe the difference that I booted up into single user mode ? I presume Basil issued a 'init 1' from a running system. -- Per Jessen, Zürich (27.7°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 22/08/2018 à 14:18, Andrei Borzenkov a écrit :
22.08.2018 14:17, Carlos E. R. пишет:
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
You cannot use fsck on mounted filesystem. Period.
I see this in the man page -M Do not check mounted filesystems and return an exit code of 0 for mounted filesystems. and for ext4: " Note that in general it is not safe to run e2fsck on mounted filesystems. The only exception is if the -n option is specified, and -c, -l, or -L options are not specified. However, even if it is safe to do so, the results printed by e2fsck are not valid if the filesystem is mounted. If e2fsck asks whether or not you should check a filesystem which is mounted, the only correct answer is ``no''. Only experts who really know what they are doing should consider answering this question in any other way." so yes, you *can* use it but you better not jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov wrote:
22.08.2018 14:17, Carlos E. R. пишет:
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
You cannot use fsck on mounted filesystem. Period.
When it's mounted read-only? I'm sure I did that just yesterday. -- Per Jessen, Zürich (28.6°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-22 14:18, Andrei Borzenkov wrote:
22.08.2018 14:17, Carlos E. R. пишет:
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
You cannot use fsck on mounted filesystem. Period.
We know that, since many years. But some of us have been doing, for years as well, remounting as read only the root filesystem, after switching to perhaps runlevel 1 or S. This worked prior to systemd, but is in doubt now. Once it is in read only mode, fsck works. Since ever, too. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
22.08.2018 15:37, Per Jessen пишет:
Andrei Borzenkov wrote:
22.08.2018 14:17, Carlos E. R. пишет:
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
You cannot use fsck on mounted filesystem. Period.
When it's mounted read-only? I'm sure I did that just yesterday.
It won't prevent you from shooting yourself in the foot, that's right. You cannot change mounted filesystem, read-only or not, which means to actually fix it (assuming fsck reports errors) you need to unmount it anyway. So you just wasted your time. If you want to fsck, you do it before mounting, not after. And in any case, it has nothing to do with runlevel, so any bickering about 1 vs. S is entirely off mark. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-22 16:28, Andrei Borzenkov wrote:
22.08.2018 15:37, Per Jessen пишет:
Andrei Borzenkov wrote:
22.08.2018 14:17, Carlos E. R. пишет:
But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same.
You cannot use fsck on mounted filesystem. Period.
When it's mounted read-only? I'm sure I did that just yesterday.
It won't prevent you from shooting yourself in the foot, that's right.
You cannot change mounted filesystem, read-only or not, which means to actually fix it (assuming fsck reports errors) you need to unmount it anyway. So you just wasted your time. If you want to fsck, you do it before mounting, not after.
And in any case, it has nothing to do with runlevel, so any bickering about 1 vs. S is entirely off mark.
No. The old init system did run fsck of "/" as part of initialization, and did repair it, automatically. I can find out the script that did that ... Here: Eleanor6:~ # cat /etc/SuSE-release openSUSE 11.4 (x86_64) VERSION = 11.4 CODENAME = Celadon Eleanor6:~ # /etc/init.d/boot.rootfsck The test was forced if "/forcefsck" existed. To test for that file it had to mount the filesystem first. See how the code remounts it r/o below, then runs the fsck: if test ! -f /fastboot -a "$DO_FASTBOOT" != "yes" -a $MAY_FSCK -eq 1 ; then # If we use a serial console, don't use the fsck progress bar if test "${REDIRECT##*/}" = "tty1" ; then FSCK_OPTS="$FSCK_OPTS -C" else FSCK_OPTS="$FSCK_OPTS -V" fi # on an umsdos root fs this mount will fail, # so direct error messages to /dev/null. # this seems to be ugly, but should not really be a problem. mount -n -o remount,ro / 2> /dev/null if test $? = 0; then if test -n "$ROOTFS_FSCK" ; then FSCK_RETURN=$ROOTFS_FSCK else echo "Checking root file system..." fsck $FSCK_OPTS $ROOTFS_BLKDEV # A return code of 1 indicates that file system errors # were corrected, but that the boot may proceed. # A return code of 2 or larger indicates failure. FSCK_RETURN=$? fi On some circumstances, it asked the operator to do it manually: elif test $FSCK_RETURN -gt 3; then # if appropriate, switch bootsplash to verbose # mode to make text messages visible. test -f /proc/splash && echo "verbose" > /proc/splash # Stop blogd since we reboot after sulogin test -x /sbin/blogd && killproc -QUIT /sbin/blogd if test -x /etc/init.d/kbd ; then /etc/init.d/kbd start fi echo echo "fsck failed. Please repair manually and reboot. The root" echo "file system is currently mounted read-only. To remount it" echo "read-write do:" echo echo " bash# mount -n -o remount,rw /" echo echo "Attention: Only CONTROL-D will reboot the system in this" echo "maintanance mode. shutdown or reboot will not work." echo PS1="(repair filesystem) # " export PS1 /sbin/sulogin /dev/console # if the user has mounted something rw, this should be umounted echo "Unmounting file systems (ignore error messages)" umount -avn # on umsdos fs this would lead to an error message. # so direct errors to /dev/null mount -no remount,ro / 2> /dev/null mount -no remount,ro / 2> /dev/null sync reboot -f fi sync -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
The old init system did run fsck of "/" as part of initialization, and did repair it, automatically.
See systemd-fsck@ https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html # systemctl status systemd-fsck-root.service ● systemd-fsck-root.service - File System Check on Root Device Loaded: loaded (/usr/lib/systemd/system/systemd-fsck-root.service; enabled-runtime; vendor preset: disabled) Active: active (exited) since Tue 2018-08-21 13:52:30 CEST; 1 day 3h ago Docs: man:systemd-fsck-root.service(8) Main PID: 326 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4915) CGroup: /system.slice/systemd-fsck-root.service Aug 21 13:52:30 linux-wvtd systemd[1]: Starting File System Check on /dev/sda2... Aug 21 13:52:30 linux-wvtd systemd-fsck[326]: /dev/sda2: recovering journal Aug 21 13:52:30 linux-wvtd systemd-fsck[326]: /dev/sda2: clean, 450767/1310720 files, 3086541/5242880 blocks Aug 21 13:52:30 linux-wvtd systemd[1]: Started File System Check on /dev/sda2. -- Per Jessen, Zürich (30.9°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-22 16:59, Per Jessen wrote:
Carlos E. R. wrote:
The old init system did run fsck of "/" as part of initialization, and did repair it, automatically.
See systemd-fsck@
https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html
# systemctl status systemd-fsck-root.service ● systemd-fsck-root.service - File System Check on Root Device
So, it is still there :-) I wonder if it still honours "/forcefsck" :-? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
22.08.2018 18:30, Carlos E. R. пишет:
On 2018-08-22 16:59, Per Jessen wrote:
Carlos E. R. wrote:
The old init system did run fsck of "/" as part of initialization, and did repair it, automatically.
See systemd-fsck@
https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html
# systemctl status systemd-fsck-root.service ● systemd-fsck-root.service - File System Check on Root Device
So, it is still there :-)
I wonder if it still honours "/forcefsck" :-?
This is compile time option (SysV compatibility); on openSUSE it should support it.
On 21/08/18 18:37, Carlos E. R. wrote:
On 2018-08-21 07:01, Basil Chupin wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system. Thanks Carlos, this is where for the first time I am going to create
On 19/08/18 21:43, Carlos E. R. wrote: that Rescue Disc/Stick :-). Now to read the 'How To...' :-). Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Yes, for this thing it suffices. But the full rescue image is way more
On 2018-08-20 04:08, Lew Wolfgang wrote: powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc.
Thus you can use, for instance, gparted :-) Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not
On 20/08/18 20:32, Carlos E. R. wrote: the Rescue System on the Leap 15 DVD?! None of those.
I'm talking about the openSUSE rescue CD:
aria2c "http://download.opensuse.org/distribution/leap/15.0/live/openSUSE-Leap-15.0-..." I thought it was obvious :-)
Nope, didn't know it existed although I seem to remember that many moons ago there was an option on the DVD installation iso to create such a disc. Downloading it now -- and will reread your instructions on how to put this onto a USB stick :-). BC -- "Truth isn't truth." Rudy Guiliani, Donald Trump's lawyer, 20 August 2018 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 21/08/18 19:34, Per Jessen wrote:
Basil Chupin wrote:
But the simplest way in the past was to do what I wrote in my opening post. And if only someone could tell me what now replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.) Nothing, afaik - it's a perfectly valid mount command.
You wrote initially "it doesn't work" - exactly what happens?
I tried it on a running system and of course it says:
office38:~ # mount -o remount,ro / mount: /: mount point is busy.
What happens when you've done "init 1" and you try the remount?
The "doesn't work" is exactly the message one gets as you just described. That command is only run in 'init 1' mode -- and that's the msg you get. BC -- "Truth isn't truth." Rudy Guiliani, Donald Trump's lawyer, 20 August 2018 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/26/2018 09:50 AM, Basil Chupin wrote:
On 21/08/18 18:37, Carlos E. R. wrote:
On 2018-08-21 07:01, Basil Chupin wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
On 19/08/18 21:43, Carlos E. R. wrote: > Anyway, this boot fsck sometimes failed and said I needed do a full > fsck, manually. Which meant a rescue system. Thanks Carlos, this is where for the first time I am going to create that Rescue Disc/Stick :-). Now to read the 'How To...' :-). Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Yes, for this thing it suffices. But the full rescue image is way more
On 2018-08-20 04:08, Lew Wolfgang wrote: powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc.
Thus you can use, for instance, gparted :-) Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not
On 20/08/18 20:32, Carlos E. R. wrote: the Rescue System on the Leap 15 DVD?! None of those.
I'm talking about the openSUSE rescue CD:
aria2c "http://download.opensuse.org/distribution/leap/15.0/live/openSUSE-Leap-15.0-..."
I thought it was obvious :-)
Nope, didn't know it existed although I seem to remember that many moons ago there was an option on the DVD installation iso to create such a disc.
I don't remember that one :-?
Downloading it now -- and will reread your instructions on how to put this onto a USB stick :-).
Good :-) -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
On 21/08/18 18:37, Carlos E. R. wrote:
On 2018-08-21 07:01, Basil Chupin wrote:
On 08/19/2018 06:57 PM, Basil Chupin wrote:
Anyway, this boot fsck sometimes failed and said I needed do a full fsck, manually. Which meant a rescue system. Thanks Carlos, this is where for the first time I am going to create
On 19/08/18 21:43, Carlos E. R. wrote: that Rescue Disc/Stick :-). Now to read the 'How To...' :-). Why don't you just use the rescue system on the installation DVD, Basil? I use it all the time. Yes, for this thing it suffices. But the full rescue image is way more
On 2018-08-20 04:08, Lew Wolfgang wrote: powerful, it is a full graphics desktop with XFCE on which you can install your tools if your favourite is missing, use internet, etc.
Thus you can use, for instance, gparted :-) Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not
On 20/08/18 20:32, Carlos E. R. wrote: the Rescue System on the Leap 15 DVD?! None of those.
I'm talking about the openSUSE rescue CD:
aria2c "http://download.opensuse.org/distribution/leap/15.0/live/openSUSE-Leap-15.0-..." I thought it was obvious :-)
No, not obvious. The old adage, "Assumption is the mother of all f****-ups", applies :-). OK, I downloaded that Rescue CD and have tried at least 8 times to create a bootable USB (8GB) stick with it on it. I used the wiki instructions here- https://en.opensuse.org/SDB:Live_USB_stick but do not have a bootable stick. I can see that it contains the (apparent) Rescue CD but it won't booth even though it is recognised on the laptop as an USB stick. BC -- "Truth isn't truth." Rudy Guiliani, Donald Trump's lawyer, 20 August 2018 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/08/18 21:46, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 14:06, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 11:34, Per Jessen wrote: > Basil Chupin wrote: > >> But the simplest way in the past was to do what I wrote in my >> opening post. And if only someone could tell me what now >> replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.) > Nothing, afaik - it's a perfectly valid mount command. > > You wrote initially "it doesn't work" - exactly what happens? > > I tried it on a running system and of course it says: > > office38:~ # mount -o remount,ro / > mount: /: mount point is busy. > > What happens when you've done "init 1" and you try the remount? IIRC, same thing. Busy. Long time since I last tried. Just tried it, you're right.
Boot up into single user mode, and it works though. What level is "single user mode"? :-?
I thought that was "init 1". I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd. But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same. According to the man page, they are. (man init). Maybe the difference that I booted up into single user mode ? I presume Basil issued a 'init 1' from a running system.
Close. Certainly from a running system but, as root, first issued command 'init 3', logged in as root again and then issued 'init 1'. Had been doing that for years after I started using a Linux distro (SuSE -- way back...). The laptop is busy at the moment (updating Leap 15.0) but I will try booting into init 1 first and then using the esfsck command. BC -- "Truth isn't truth." Rudy Guiliani, Donald Trump's lawyer, 20 August 2018 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/09/18 13:21, Basil Chupin wrote:
On 22/08/18 21:46, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 14:06, Per Jessen wrote:
Carlos E. R. wrote:
On 2018-08-21 13:55, Per Jessen wrote:
Carlos E. R. wrote:
> On 2018-08-21 11:34, Per Jessen wrote: >> Basil Chupin wrote: >> >>> But the simplest way in the past was to do what I wrote in my >>> opening post. And if only someone could tell me what now >>> replaces 'mount -o remount, ro /dev/hdXY' in systemd :-(.) >> Nothing, afaik - it's a perfectly valid mount command. >> >> You wrote initially "it doesn't work" - exactly what happens? >> >> I tried it on a running system and of course it says: >> >> office38:~ # mount -o remount,ro / >> mount: /: mount point is busy. >> >> What happens when you've done "init 1" and you try the remount? > IIRC, same thing. Busy. Long time since I last tried. Just tried it, you're right.
Boot up into single user mode, and it works though. What level is "single user mode"? :-?
I thought that was "init 1". I boot up with "init S". I have never used "init 1".
see "man init", Looks like S and 1 are the same on systemd. But Basil (and you?) says that fsck can't check root on init 1, and you say you can on init S, so they are not the same. According to the man page, they are. (man init). Maybe the difference that I booted up into single user mode ? I presume Basil issued a 'init 1' from a running system.
Close. Certainly from a running system but, as root, first issued command 'init 3', logged in as root again and then issued 'init 1'. Had been doing that for years after I started using a Linux distro (SuSE -- way back...).
The laptop is busy at the moment (updating Leap 15.0) but I will try booting into init 1 first and then using the esfsck command.
BC
Ok, laptop free and booted into Leap 15.0 with 'init 1'. 'e2fsck' will only 'work' if you first do 'mount -o remount,ro /dev/<sdXY>' otherwise you get the msg that <sdXY> is mounted; then you can do 'e2fsck [-f] [-p] /dev/<sdXY>. Provided you are able to get the Grub2 menu when booting and know on which '/dev' the file system you want to check is installed then doing the above is a lot quicker than either using a Rescue CD on an USB stick or the Rescue CD itself. BC -- "Truth isn't truth." Rudy Guiliani, Donald Trump's lawyer, 20 August 2018 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/09/2018 23.14, Basil Chupin wrote:
On 21/08/18 18:37, Carlos E. R. wrote:
...
Oh for Chrissake! Carlos are you talking about and have been talking about the SystemRescueCD from http://www.system-rescue-cd.org/ and not the Rescue System on the Leap 15 DVD?! None of those.
I'm talking about the openSUSE rescue CD:
aria2c "http://download.opensuse.org/distribution/leap/15.0/live/openSUSE-Leap-15.0-..."
I thought it was obvious :-)
No, not obvious. The old adage, "Assumption is the mother of all f****-ups", applies :-).
OK, I downloaded that Rescue CD and have tried at least 8 times to create a bootable USB (8GB) stick with it on it. I used the wiki instructions here-
https://en.opensuse.org/SDB:Live_USB_stick
but do not have a bootable stick. I can see that it contains the (apparent) Rescue CD but it won't booth even though it is recognised on the laptop as an USB stick.
Try another stick brand. Happened to me about two months ago. 15.0 would not boot. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (9)
-
Andrei Borzenkov
-
Basil Chupin
-
Carlos E. R.
-
Carlos E. R.
-
ellanios82
-
jdd@dodin.org
-
Lew Wolfgang
-
Patrick Shanahan
-
Per Jessen