You are not logged in.

#1 2012-07-08 23:17:33

jallenusn
Member
Registered: 2012-06-11
Posts: 34

[Solved] Grub> after moving from ext2 to ext4

When I boot without a live cd I am staring at the grub1 rescue console.  I followed the instructions here to go from ext2 to ext 4 http://www.ghacks.net/2010/08/11/convert-ext23-to-ext4/

When I got to the part about changing /etc/fstab from ext2 to ext4, I noticed my /etc/fstab was empty.  I suppose that's what I get for meddling with something I don't completely understand but I've consistently followed instructions on the wiki and done fine with plenty of other things I didn't understand. 

Since this epic disaster I've managed to Chroot in and change my /etc/fstab to depict ext4 and mkinitcpio -p linux and change my /etc/default/grub to direct rootfstype=ext4 and run grub-mkconfig -o /boot/grub/grub.cfg.

I feel like this is salvagable but I am at a complete loss as to where to go from here.  My hd layout is as follows, my boot is recognized as a ext4 fs, everything seems to be intact I just cannot boot.  One thing I did notice that is out of place is that the grub console I am booting to is grub-legacy.  I am uncertain as to why because I was using grub2.  I suspect it was due to me using fsarchiver to backup my ext2 boot and then reinsert it onto an ext4 fs or because I am using the arch install disk and the grub-install command put grub1 on it. 

/dev/sda1     /boot     ext4
/dev/sda2                 swap
/dev/sda3     /           btrfs
/dev/sda4     /home   btrfs

I am guessing what probably has to happen is I need to reinstall grub2 onto /dev/sda1 .  Would it be as easy as pacman -S grub2-bios while in chroot?

Last edited by jallenusn (2012-07-09 21:22:52)

Offline

#2 2012-07-08 23:28:24

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [Solved] Grub> after moving from ext2 to ext4

No. You'd also need to install grub to the MBR, just like you did when you first installed it. Read https://wiki.archlinux.org/index.php/Grub2 if your memory is a little hazy.

I'm a little worried that your fstab was empty though. If you still have problems after you reinstall grub2, you may want to share what you have in it now, as well as a list of partitons on your system (e.g.

# blkid -c /dev/null

)


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.

Online

#3 2012-07-08 23:51:18

jallenusn
Member
Registered: 2012-06-11
Posts: 34

Re: [Solved] Grub> after moving from ext2 to ext4

I am going down the steps to reinstall grub2 now.  I ran blkid -c /dev/null and it returned this.  the UUID's are actually filled in on what it returns.  I left them blank for obvious reasons. 

/dev/sda1:  UUID: "" TYPE="ext2"
/dev/sda2: UUID: "" TYPE="swap"
/dev/sda3:  UUID: "" UUID_SUB="" TYPE="btrfs"
/dev/sda4:  UUID: "" UUID_SUB="" TYPE="btrfs"

/dev/loop100:  TYPE=squashfs
/dev/loop101:  UUID"" TYPE=ext4
/dev/loop102  type=ext4
/dev/mapper/arch_root-image:  type ext4
/dev/loop103 TYPE=squashfs
/dev/loop104:  UUID TYPE=ext4
/dev/mapper/arch_lib-modules   type=ext4
/dev/loop106  type=squashfs
basically rinse repeat all the way to loop 109 & 110 which are both squashfs.


Edit:  I just ran pacman -S grub2-bios and it returned warnings stating "could not get filesystem information for /bootmnt, /cowspace, /sfs/root-image, /sfs/lib-modules, /sfs/sur-share, /repo/core/x86_64, /rep/core/any, & /bootmnt (in that order)

Last edited by jallenusn (2012-07-08 23:58:16)

Offline

#4 2012-07-09 00:11:49

jallenusn
Member
Registered: 2012-06-11
Posts: 34

Re: [Solved] Grub> after moving from ext2 to ext4

reinstallation is complete.  While pacman did kick back the above the messages the

grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --grub-setup=/bin/true --boot-directory=/boot --recheck --debug /dev/sda

went through without any errors.

I have too many files in my boot directory.  I think that when I restored the directory (in my panic of realization that something wasn't working) from my fsarchiver save file.  I restored everything to /boot/boot.  ugh...this is turning into a dumpster fire.  can i just rm -r that /boot/boot file?

Last edited by jallenusn (2012-07-09 00:17:25)

Offline

#5 2012-07-09 00:29:57

jallenusn
Member
Registered: 2012-06-11
Posts: 34

Re: [Solved] Grub> after moving from ext2 to ext4

successful boot!  ...from xterm output of blkid -c /dev/null is

/dev/sda1: UUID="54d38b5e-db10-4162-bfcd-1226ada0d561" TYPE="ext2" 
/dev/sda2: UUID="ed544180-58d1-49f9-8e01-4f0fc5ef3c8d" TYPE="swap" 
/dev/sda3: UUID="719a75c8-81fa-4f8d-b06a-b2ab3ba18770" UUID_SUB="13bd8f77-5eed-4511-9369-881687fbdcd9" TYPE="btrfs" 
/dev/sda4: UUID="4b5959d0-8f20-4934-9cfc-23db74ad181e" UUID_SUB="1adb21c6-1e35-4fb1-a3eb-83916c66ae2f" TYPE="btrfs" 

Is that problematic or does that seem to be reasonable output?  I cannot find the thread now but I have seen a thread where people have similar issues of their output showing ext2 when they have switched to ext4.

Last edited by jallenusn (2012-07-09 01:58:28)

Offline

#6 2012-07-09 02:29:35

jallenusn
Member
Registered: 2012-06-11
Posts: 34

Re: [Solved] Grub> after moving from ext2 to ext4

After several reboots I feel pretty comfortable marking this as solved.  Although I would like to pursue the cause of my ext4 boot FS showing up as an ext2 FS with blkid, there is already a thread for that somewhere.

I would also like to know if it is safe to rm -r /boot/* seeing as the directory appears to be a duplicate of the /boot directory

Offline

#7 2012-07-09 06:33:21

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [Solved] Grub> after moving from ext2 to ext4

jallenusn wrote:

After several reboots I feel pretty comfortable marking this as solved.  Although I would like to pursue the cause of my ext4 boot FS showing up as an ext2 FS with blkid, there is already a thread for that somewhere.

I would also like to know if it is safe to rm -r /boot/* seeing as the directory appears to be a duplicate of the /boot directory

No, don't run that command, it'd remove everything from your /boot folder. Including kernels and grub's config. tongue

I think you meant /boot/boot/* though. You should be fine deleting that, but try renaming it first, and see if you can still boot. If you can, then that'd confirm that it's not needed.


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.

Online

Board footer

Powered by FluxBB