You are not logged in.
Before systemd I could boot into single mode, then "mount / -o remount,ro" and then "fsck.ext4 -c ...". Now I can't since it says / is in use and I can't remount as read-only. What do I do?
Last edited by Butcher (2012-10-22 09:54:22)
Offline
I think that if you boot the kernel with single as a parameter you will get into rescue mode. But better wait for an answer from someone more competent than me.
Offline
If you want to fsck your /, is there a reason why you're not letting the initramfs do so?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
If you want to fsck your /, is there a reason why you're not letting the initramfs do so?
How would he trigger it?
Offline
Add fsck to the list of modules in /etc/mkinitcpio.conf, regenerate initramfs. (If necessary) And set pass_no for / to 1 in /etc/fstab. Reboot.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
How would he trigger it?
Add fsck.mode=force to the kernel command-line. The initramfs should be built with the fsck hook of course.
89c51 is also correct, adding single to the kernel command-line will make systemd boot into emergency mode. I know that and I don't even use systemd
. Adding 1, s, S or emergency will do the same.
Last edited by Gusar (2012-10-19 12:58:59)
Offline
No, this will boot into rescue.target. What you want is emergency.target. So, you want to add systemd.unit=emergency.target to your command line.
If you have fsck in initramfs (which you should), then you can instead add break=premount. This will drop you into the emergency shell and allow to fsck from there.
Offline
No, this will boot into rescue.target. What you want is emergency.target.
Two similar targets? Interesting. I just found Fedora's sysvinit to systemd cheat sheet - adding emergency gets you the emergency target. All the others I mentioned get you the rescue target. Now I'll have to go figure out what the difference between those two targets is ![]()
Offline
Thanks for your replies. I already have fsck in my initramfs, but I don't have badblocks there. How do I add it?
Offline
Two similar targets? Interesting. I just found Fedora's sysvinit to systemd cheat sheet - adding emergency gets you the emergency target. All the others I mentioned get you the rescue target. Now I'll have to go figure out what the difference between those two targets is
[Unit]
Description=Emergency Mode
Documentation=man:systemd.special(7)
Requires=emergency.service
After=emergency.service
AllowIsolate=yesemergency.target only launches emergency.service, which is a root shell (sulogin) on your primary console. No udev, no journald, no nothing.
[Unit]
Description=Rescue Mode
Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service
After=sysinit.target rescue.service
AllowIsolate=yes
[Install]
Alias=kbrequest.targetThis launches sysinit.target, thus udev and journal are running and file systems are mounted. Then it launches rescue.service, which is almost identical to emergency.service.
Last edited by brain0 (2012-10-19 15:21:47)
Offline
Thanks for your replies. I already have fsck in my initramfs, but I don't have badblocks there. How do I add it?
BINARIES="badblocks" in mkinitcpio.conf.
Offline