Bug 5659 - System unbootable after fresh install on btrfs root
Summary: System unbootable after fresh install on btrfs root
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: High normal
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard: MGA2TOO
Keywords: NEEDINFO
: 6692 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-28 16:12 CEST by Sebastian Blaziak
Modified: 2014-11-15 17:32 CET (History)
4 users (show)

See Also:
Source RPM: dracut
CVE:
Status comment:


Attachments

Description Sebastian Blaziak 2012-04-28 16:12:09 CEST
Description of problem:
After a fresh install of M2b3, the boot process fails when mounting root partition on btrfs.

sda with:
sda1 /boot on ext2
sda2 swap 
sda3 / on btrfs

errors displayed:
mount: unknown filesystem type 'btrfs'
umount: /sysroot: not mounted
[ 2.612703] dracut: Remounting /dev/disk/by-uuid/f16...304 with -o ro
[ 2.621807] dracut: mount: unknown filesystem type 'btrfs'
... (loops couple of times before giving up)

Version-Release number of selected component (if applicable): Dual ISO of M2b3


How reproducible:
Install from scratch

Steps to Reproduce:
1. (see above for setup details)
Comment 1 Manuel Hiebel 2012-04-29 00:48:39 CEST
added the maintainer since I see nothing related to btrfs in the dracut changelog

Assignee: bugsquad => mageia
Source RPM: (none) => dracut

Comment 2 Colin Guthrie 2012-04-29 12:33:13 CEST
I just did a network install with:
 sda1 /boot on ext4
 sda5 swap
 sda6 / on btrfs

Worked fine and rebooted without issue.

Not sure if it's something fixed with installer updates after beta3 but it's certainly all OK for me.

Can you reproduce with latest everything?
Comment 3 Sebastian Blaziak 2012-05-04 00:27:43 CEST
I could still reproduce after M2b2 install + update during install, but with network install (M2RC), issue is resolved.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 4 Manuel Hiebel 2012-07-12 19:25:42 CEST
*** Bug 6692 has been marked as a duplicate of this bug. ***

CC: (none) => tavvva

Comment 5 Manuel Hiebel 2012-07-12 19:26:32 CEST
reoping as it's valid again see duplicate

Whiteboard: (none) => MGA2TOO

Comment 6 Manuel Hiebel 2012-07-12 19:26:44 CEST
really

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 7 Marja Van Waes 2012-08-05 13:12:18 CEST
If you hit this bug, please tell whether Colin's workaround from the link below solves it for you

https://bugs.mageia.org/show_bug.cgi?id=6692#c11
> I can also confirm that simply switching to tty2 while at the user password
> screen and doing: "rm -f /mnt/boot/initrd-3*.img" will allow for the bootloader
> to be regenerated properly as part of the installer process.

@ Jaromír

It seems you missed that Colin asked you to confirm this works in 
https://bugs.mageia.org/show_bug.cgi?id=6692#c14

CC: (none) => marja11

Comment 8 Jim Darby 2013-01-27 01:53:01 CET
I shall try and confirm this with a DVD install. However, in the meantime I have a very related issue which is that given a new install on a fresh disk the DVD installer is unable to mount btrfs (or XFS) partitions because the relevant kernel modules have not been loaded.

Switching to tty2 and running modprobe btrfs (and modprobe xfs) fixes this problem when you retry the disk partitioning and formatting.

So it looks like we have a problem with MGA3B2 not loading modules and creating initrd properly.

If you want me to file this as an additional bug I can but they are VERY related.

The system hasn't finished installing so I can't confirm if it boots or not yet!

CC: (none) => uberscubajim

Comment 9 Colin Guthrie 2013-01-27 10:23:20 CET
The issues in mga2 (reported here) are quite different from those in mga3.

That said I think the issue of initrd generation for xfs in mga3 should be solved when we push dracut 025, So please do check then (or do a net install when dracut 025 is available in cauldron)
Comment 10 Jim Darby 2013-01-28 15:18:56 CET
OK, I've just been running some more tests.

The M2B2 problem has recurred in M3B2. It's identical as far as I can tell. There is no btrfs module available when the system boots so it can't boot. The same almost certainly applies to XFS.

Similarly, you have to take extra steps to create a system with a btrfs and/or XFS filesystem during install. Specifically manually modprobeing btrfs and xfs.

So, it would appear that M3B2 has the same problems as M2B2.
Comment 11 Colin Guthrie 2013-01-28 15:24:20 CET
The issue in mga2 (which I'm not sure is resolved) is that of a buggy theme package which was updated with certain %post scripts that resulted in the initrd being generated too early in the install process (i.e. when the theme is installed, not at the end when all package installation is complete).

If this same problem is happening in mga3 I'd be surprised, but it's easy to check.

Simply do the install, but after the package installation, flip over to a text terminal when the "Add user" screen is visible and check to see if any files are present in the /mnt/boot/ folder matching the *.img glob. If so, rm them (the actual files, ignore any symlinks that may be present), and flip back to the install and then complete it as usual. If this solves your problem then please let me know and I'll look into what is triggering the initrd generation early.
Comment 12 Jim Darby 2013-01-28 18:49:32 CET
Ok, sorry for the delay but I've double checked.

It is indeed the same as in M2B2 with the files initrd-desktop.img and initrd-server.img in /mnt/boot.

I've deleted the .img files and it seems to rebuild them OK.

So far I've only checked with reiserfs (which I think failed before) but that works. I'm just starting a check with btrfs and will report back.
Comment 13 Colin Guthrie 2013-01-28 19:05:08 CET
Hmm, those files you mention should just be symlinks, not real files. Did they point to real files which you deleted? If so, then that's fine, but if not then something is still amiss elsewhere...
Comment 14 Jim Darby 2013-01-28 19:16:16 CET
No, they were real files.

I'm currently reinstalling again (1 minute to go!). Manually modprobing btrfs during installation meant that I could not only format but use a btrfs / (I have an ext2 /boot).

Hang on. I'm back at setting the root password and can confirm stuff.

I was wrong, the files are symbolic links. initrd-desktop.img points to initrd-3.8.0-desktop-0.rc4.1.mga3.img (which doesn't exist) and initrd-server.img which points to initrd-3.8.0-server-0.rc4.1.mga3.img.

I deleted the symlinks then completed setting the root password and creating users.

I then rebooted the system and it *didn't* work! No btrfs module was installed!

Added note: the root file system was btrfs and installed over a LUKS partition.
Comment 15 Jim Darby 2013-01-28 19:17:29 CET
Dang! Should have added: do you want me to try without LUKS and/or without deleting the symlinks in /boot?
Comment 16 Colin Guthrie 2013-01-28 19:29:28 CET
No it's OK, I think I'll need to go through and try and debug in a VM myself to see what's happening.

The symlinks existing (but dangling) is expected. The files they point to should be created at the end. It is, however, odd that you have both desktop and server kernels apparently installed. Is that something you've manually chosen? Also did the initrd-3.8.0-server-0.rc4.1.mga3.img file (point to by initrd-server.img) exist when you looked? If so, then this shines some light on the situation. If you could confirm how you got both -desktop and -server installs that would be most useful for reproducing.

You also shouldn't need to modprobe btrfs manually during install to be able to see existing and format new btrfs partitions... it should all "just work"(tm), so that likely needs some investigation also.
Comment 17 Jim Darby 2013-01-29 01:25:49 CET
I didn't manually choose both kernels. It was a pretty vanilla install of a LXDE system (so it would install quicker).

Good luck with the VMing. I use virtualbox myself.
Comment 18 Chris Denice 2013-04-30 09:35:23 CEST
I am confirming this bug with a fresh new install with mga3 RC1 on a dell xps 13 laptop (brand new and still shinning!)

Amazingly, I would have never done that by myself, but the installer proposed me btrfs as a default choice instead of ext4, and I accepted. I think that triggers a critical bug, because it is going to happen to many too curious soon :)

The install goes fine, but at boot time, "operating system not found". Mounting my partition with boot.iso and trying to reinstall the bootloader also fails with a error like "invalid device".

I tried a second install, putting everything as before *but* creating only a /boot with ext4 (/ /home/ /usr still on btrfs). In that case, the bootloader got installed.

So, the problem is only having /boot with btrfs now.

Cheers,
Chris

Priority: Normal => High
CC: (none) => dirteat

Comment 19 Dick Gevers 2014-11-15 06:22:11 CET
Installer of M2 or M3 cannot be fixed. If this is valid for 5beta1 please change the whiteboard. Alternatively, it should be closed.

Keywords: (none) => NEEDINFO

Comment 20 Chris Denice 2014-11-15 11:28:29 CET
I have just tested with 5beta1 installer; that bug is fixed.

/dev/sda6 on / type btrfs (rw,relatime,ssd,space_cache)
/dev/sda1 on /boot type ext2 (rw,relatime,errors=continue,user_xattr,acl)

Cheers,
Chris.
Comment 21 Marja Van Waes 2014-11-15 17:32:31 CET
(In reply to Chris Denice from comment #20)
> I have just tested with 5beta1 installer; that bug is fixed.


Thanks :-)

Closing

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.