How to force a file system check on the next boot of the root file system on Gentoo running systemd?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I want to force a fsck run on my root filessystem on my Gentoo system running systemd.
I've tried
- adding an empty
forcefsck
file at the root of the filesystem which I want to check, e.g.touch /forcefsck
- adding
fsck.mode=force
as kernel boot parameter
Nothing worked so far. What's the right approach?
systemd gentoo fsck
add a comment |Â
up vote
0
down vote
favorite
I want to force a fsck run on my root filessystem on my Gentoo system running systemd.
I've tried
- adding an empty
forcefsck
file at the root of the filesystem which I want to check, e.g.touch /forcefsck
- adding
fsck.mode=force
as kernel boot parameter
Nothing worked so far. What's the right approach?
systemd gentoo fsck
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to force a fsck run on my root filessystem on my Gentoo system running systemd.
I've tried
- adding an empty
forcefsck
file at the root of the filesystem which I want to check, e.g.touch /forcefsck
- adding
fsck.mode=force
as kernel boot parameter
Nothing worked so far. What's the right approach?
systemd gentoo fsck
I want to force a fsck run on my root filessystem on my Gentoo system running systemd.
I've tried
- adding an empty
forcefsck
file at the root of the filesystem which I want to check, e.g.touch /forcefsck
- adding
fsck.mode=force
as kernel boot parameter
Nothing worked so far. What's the right approach?
systemd gentoo fsck
systemd gentoo fsck
asked Jul 15 '15 at 8:25
Flow
438516
438516
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58
add a comment |Â
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
The latter (fsck.mode=force
) is the right approach. However, to fsck a root, you must either:
- have a systemd-controlled initramfs (so that it could parse
fsck.mode=force
) with the corresponding fsck binary built in; - have an initramfs which mounts rootfs read-only (so that systemd, started from rootfs, still can check it â checking a read-write mounted filesystem is impossible);
- have no initramfs and tell kernel to mount rootfs read-only (by
ro
kernel cmdline parameter).
add a comment |Â
up vote
0
down vote
I had the same issue, what worked for me was ignore what is written on blogs and go read the man page. Having to change your boot configuration twice for simply forcing a check of your root partition did not sound right.
You specify passno=1
in your /etc/fstab
for the filesystems you would like to check and reboot. Simply remove the entry after reboot.
The man page
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The latter (fsck.mode=force
) is the right approach. However, to fsck a root, you must either:
- have a systemd-controlled initramfs (so that it could parse
fsck.mode=force
) with the corresponding fsck binary built in; - have an initramfs which mounts rootfs read-only (so that systemd, started from rootfs, still can check it â checking a read-write mounted filesystem is impossible);
- have no initramfs and tell kernel to mount rootfs read-only (by
ro
kernel cmdline parameter).
add a comment |Â
up vote
2
down vote
The latter (fsck.mode=force
) is the right approach. However, to fsck a root, you must either:
- have a systemd-controlled initramfs (so that it could parse
fsck.mode=force
) with the corresponding fsck binary built in; - have an initramfs which mounts rootfs read-only (so that systemd, started from rootfs, still can check it â checking a read-write mounted filesystem is impossible);
- have no initramfs and tell kernel to mount rootfs read-only (by
ro
kernel cmdline parameter).
add a comment |Â
up vote
2
down vote
up vote
2
down vote
The latter (fsck.mode=force
) is the right approach. However, to fsck a root, you must either:
- have a systemd-controlled initramfs (so that it could parse
fsck.mode=force
) with the corresponding fsck binary built in; - have an initramfs which mounts rootfs read-only (so that systemd, started from rootfs, still can check it â checking a read-write mounted filesystem is impossible);
- have no initramfs and tell kernel to mount rootfs read-only (by
ro
kernel cmdline parameter).
The latter (fsck.mode=force
) is the right approach. However, to fsck a root, you must either:
- have a systemd-controlled initramfs (so that it could parse
fsck.mode=force
) with the corresponding fsck binary built in; - have an initramfs which mounts rootfs read-only (so that systemd, started from rootfs, still can check it â checking a read-write mounted filesystem is impossible);
- have no initramfs and tell kernel to mount rootfs read-only (by
ro
kernel cmdline parameter).
answered Jul 15 '15 at 10:26
intelfx
2,8561122
2,8561122
add a comment |Â
add a comment |Â
up vote
0
down vote
I had the same issue, what worked for me was ignore what is written on blogs and go read the man page. Having to change your boot configuration twice for simply forcing a check of your root partition did not sound right.
You specify passno=1
in your /etc/fstab
for the filesystems you would like to check and reboot. Simply remove the entry after reboot.
The man page
add a comment |Â
up vote
0
down vote
I had the same issue, what worked for me was ignore what is written on blogs and go read the man page. Having to change your boot configuration twice for simply forcing a check of your root partition did not sound right.
You specify passno=1
in your /etc/fstab
for the filesystems you would like to check and reboot. Simply remove the entry after reboot.
The man page
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I had the same issue, what worked for me was ignore what is written on blogs and go read the man page. Having to change your boot configuration twice for simply forcing a check of your root partition did not sound right.
You specify passno=1
in your /etc/fstab
for the filesystems you would like to check and reboot. Simply remove the entry after reboot.
The man page
I had the same issue, what worked for me was ignore what is written on blogs and go read the man page. Having to change your boot configuration twice for simply forcing a check of your root partition did not sound right.
You specify passno=1
in your /etc/fstab
for the filesystems you would like to check and reboot. Simply remove the entry after reboot.
The man page
answered Nov 25 '17 at 15:44
thecarpy
2,210824
2,210824
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f216105%2fhow-to-force-a-file-system-check-on-the-next-boot-of-the-root-file-system-on-gen%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I would recommend to explore /etc/inittab which can give you control for the next boot.<Thanks>
â Dzango
Jul 15 '15 at 9:29
So changing the boot configuration twice has been exchanged for changing the fstab twice.... Intercepting the boot in the bootloader, then enter editing the command line and adding the parameter(s) for the boot en boot doesn't change any config (permanently). Should be easy to do with grub involved.
â user306274
Aug 19 at 11:58