| View previous topic :: View next topic |
| Author |
Message |
f.kater Guru

Joined: 23 May 2002 Posts: 324 Location: Berlin
|
Posted: Thu Apr 19, 2012 6:58 am Post subject: initramfs: fsck fails on boot, root partition not found |
|
|
Hi,
fsck.ext4 is not executed at boot time becauseis not found.
After boot, I see that mount does see the root partition:
| Code: | mount
rootfs on / type rootfs (rw)
/dev/mapper/luks on / type ext4 (rw,noatime,barrier=1,data=ordered,discard)
... |
however ls does not: | Code: | ls /dev/mapper
/dev/mapper/control # SHOULD LIST /dev/mapper/luks ?! |
I am using an initramfs which does: | Code: | ...
/sbin/cryptsetup --verbose -T 5 luksOpen /dev/sda3 luks
mount -o ro /dev/mapper/luks /root
umount /proc
umount /sys
exec switch_root /root /sbin/init |
Any ideas why /dev/mapper/luks is not listed during/after boot? |
|
| Back to top |
|
 |
f.kater Guru

Joined: 23 May 2002 Posts: 324 Location: Berlin
|
Posted: Fri Apr 27, 2012 1:26 pm Post subject: |
|
|
Let me insist here:
Who has initramfs (with or without cryptsetup) and *no* issues from fsck during boot?
Could you post your init script? |
|
| Back to top |
|
 |
f.kater Guru

Joined: 23 May 2002 Posts: 324 Location: Berlin
|
|
| Back to top |
|
 |
leonidus n00b

Joined: 16 Mar 2007 Posts: 4
|
Posted: Mon May 14, 2012 12:56 pm Post subject: |
|
|
I do have two laptops where I do something similar. For one, everything works - for the other, it doesn't. I came across this thread looking for an answer. Both systems do differ in architecture (amd64/x86) and kernel configurations. udev is the same version on both.
What's different to your description is that the system where the root partition cannot be fscked does have the proper /dev/mapper/root entry once the system has booted completely. |
|
| Back to top |
|
 |
f.kater Guru

Joined: 23 May 2002 Posts: 324 Location: Berlin
|
Posted: Mon May 14, 2012 8:42 pm Post subject: |
|
|
Hi,
thanks for the info. Which system works: x86 or amd64? I am using amd64 and udev-182-r3... And further, I wonder why fsck fails although /dev/mapper/root exists - what is the error message you get?
Thanks again,
Felix |
|
| Back to top |
|
 |
SlashBeast Moderator


Joined: 23 May 2006 Posts: 2722
|
Posted: Mon May 14, 2012 10:13 pm Post subject: |
|
|
Your initramfs suppose to 'move' dev from initramfs to real system before switch_root is running.
You can grab my multifunctional initramfs from https://github.com/slashbeast/better-initramfs (binary images under downloads).
The reason why /dev/mapper is empty is because nothing created it. To force the creation you can use 'dmsetup mknodes' or you can run custom script to create symlinks there from /dev/dm-* like this one whch I created for mdev (I no longer use udev): https://github.com/slashbeast/mdev-like-a-boss/blob/master/devicemapper.sh
When initramfs move own dev to system's /dev, the udev pick it up and continue using, along with all already-created nodes. _________________ github |
|
| Back to top |
|
 |
|