Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: How to migrate from btrfs to ext4 ?

  1. #11
    Join Date
    Sep 2008
    Location
    Argentina
    Posts
    139

    Default Re: How to migrate from btrfs to ext4 ?

    Hello

    I've done the backup with tar, created a new partition, installed tar, changed /etc/fstab to mount new root (sda10), disabled all subvolumes
    and reinstalled grub with yast.
    There is reconigzed installation for sda10 and created grub entries but booting new version will hang before displaying sddm.
    Booting to single user shows, that old root is mounted from sda2 not sda10.
    My question. Is the root configure in initrd? Or is the problem the /boot which is a subvolume?
    Should I create a ext4 for boot which is shared amoung this 2 versions?

    What is strange for me that old root UUID is used in new version in grub, but if I change it to uuid of sda10 it will not boot.
    Is this to find /boot?
    Other which surprise me that ext2 module is loaded instead of ext4.
    Partition was created with gparted because disk is in GPT format...

    Any ideas?

    Here relevant grub config
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'openSUSE Leap 15.0' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-01c691d6-a48a-4b79-8454-2e9fae48c909' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod btrfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 01c691d6-a48a-4b79-8454-2e9fae48c909
    else
    search --no-floppy --fs-uuid --set=root 01c691d6-a48a-4b79-8454-2e9fae48c909
    fi
    echo 'Loading Linux 4.12.14-lp150.12.58-default ...'
    linuxefi /boot/vmlinuz-4.12.14-lp150.12.58-default root=UUID=01c691d6-a48a-4b79-8454-2e9fae48c909 ${extra_cmdline} resume=/dev/disk/by-uuid/584318b1-7b12-4955-a069-1d583b535bf2 splash=silent quiet showopts
    echo 'Loading initial ramdisk ...'
    initrdefi /boot/initrd-4.12.14-lp150.12.58-default
    }
    submenu 'Advanced options for openSUSE Leap 15.0' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-01c691d6-a48a-4b79-8454-2e9fae48c909' {
    menuentry 'openSUSE Leap 15.0, with Linux 4.12.14-lp150.12.58-default' --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.12.14-lp150.12.58-default-advanced-01c691d6-a48a-4b79-8454-2e9fae48c909' {
    load_video

    ....
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_linux_xen ###

    ### END /etc/grub.d/20_linux_xen ###

    ### BEGIN /etc/grub.d/20_memtest86+ ###
    ### END /etc/grub.d/20_memtest86+ ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'openSUSE Leap 15.0 (on /dev/sda10)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f34a1f92-f4fb-4868-aee3-d64533bf135e' {
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt10'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10 f34a1f92-f4fb-4868-aee3-d64533bf135e
    else
    search --no-floppy --fs-uuid --set=root f34a1f92-f4fb-4868-aee3-d64533bf135e
    fi
    linuxefi /boot/vmlinuz-4.12.14-lp150.12.58-default root=UUID=01c691d6-a48a-4b79-8454-2e9fae48c909 ${extra_cmdline} resume=/dev/disk/by-uuid/584318b1-7b12-4955-a069-1d583b535bf2 splash=silent quiet showopts
    initrdefi /boot/initrd-4.12.14-lp150.12.58-default
    }
    submenu 'Advanced options for openSUSE Leap 15.0 (on /dev/sda10)' $menuentry_id_option 'osprober-gnulinux-advanced-f34a1f92-f4fb-4868-aee3-d64533bf135e' {
    menuentry 'openSUSE Leap 15.0 (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.12.58-default--f34a1f92-f4fb-4868-aee3-d64533bf135e' {
    insmod part_gpt
    insmod ext2

  2. #12
    Join Date
    Sep 2012
    Posts
    4,917

    Default Re: How to migrate from btrfs to ext4 ?

    Quote Originally Posted by tkmbe View Post
    Is the root configure in initrd?
    Yes, but root= parameter on kernel command line should override it.

  3. #13
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,002
    Blog Entries
    3

    Default Re: How to migrate from btrfs to ext4 ?

    Quote Originally Posted by tkmbe View Post
    Any ideas?
    I would recommend rebuilding the "initrd".
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #14
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    794

    Default Re: How to migrate from btrfs to ext4 ?

    Migration requires grub2-install and grub2-mkconfig: https://forums.opensuse.org/showthre...-internal-disk
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  5. #15
    Join Date
    Sep 2008
    Location
    Argentina
    Posts
    139

    Default Re: How to migrate from btrfs to ext4 ?

    grub was reinstalled with yast module grub, so I guess this will to the stuff right...

    If I created initrd the other installation would not work anymore because both use this kernel :-(
    No other solution?

  6. #16
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,002
    Blog Entries
    3

    Default Re: How to migrate from btrfs to ext4 ?

    Quote Originally Posted by tkmbe View Post
    If I created initrd the other installation would not work anymore because both use this kernel :-(
    I'm not understanding that. The "initrd" file is in "/boot". Are you sharing the same "/boot" between two system?
    openSUSE Leap 15.1; KDE Plasma 5;

  7. #17
    Join Date
    Sep 2008
    Location
    Argentina
    Posts
    139

    Default Re: How to migrate from btrfs to ext4 ?

    Yes I have a shared boot.
    I always had a shared boot as first partition from the the plan old problem that /boot must be before cylinder 1024 for lilo.
    I know that this barrier ir not anymore existent, but if /boot is not shared between different systems, how a system kernel update
    can update grub.config which is in /boot?

  8. #18
    Join Date
    Sep 2008
    Location
    Argentina
    Posts
    139

    Default Re: How to migrate from btrfs to ext4 ?

    Even if I don't share /boot for same distro and version twice installed (as backup for example on same disk, for test purpose)
    /boot/efi/EFI/opensuse/grubx64.efi
    would be the same for both installation and will suffer from the same problem...
    So what is the solution to this problem?

  9. #19
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,002
    Blog Entries
    3

    Default Re: How to migrate from btrfs to ext4 ?

    Quote Originally Posted by tkmbe View Post
    but if /boot is not shared between different systems, how a system kernel update
    can update grub.config which is in /boot?
    I normally turn off "os-prober". And then I add boot entries to "/etc/grub.d/40_custom" for other systems. And the boot entry uses "configfile" to run the "grub.cfg" from the system that I want to boot. That way each system need only update its own "grub.cfg". But it does result in going through a two-level menu (main menu + menu from configfile).
    openSUSE Leap 15.1; KDE Plasma 5;

  10. #20
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,002
    Blog Entries
    3

    Default Re: How to migrate from btrfs to ext4 ?

    Quote Originally Posted by tkmbe View Post
    Even if I don't share /boot for same distro and version twice installed (as backup for example on same disk, for test purpose)
    /boot/efi/EFI/opensuse/grubx64.efi
    would be the same for both installation and will suffer from the same problem...
    So what is the solution to this problem?
    You can actually have a different directory (instead of "opensuse") in the EFI partition. You just have to set the DISTRIBUTOR line in "/etc/default/grub". The first word of DISTRIBUTOR becomes the directory name to be used.

    I tried that, but didn't like it. So my alternative strategy is:

    I keep a separate subdirectory for each system. So "tw" is the Tumbleweed subdirectory. That's "/boot/efi/EFI/opensuse/tw". And I keep a copy of the files in the subdirectory for that system. Then I can decide which I want to control booting, by copying that subdirectory to its parent. The drawback is that you have to maintain those subdirectories (update them whenever grub is reinstalled).00000
    openSUSE Leap 15.1; KDE Plasma 5;

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •