You are not logged in.

#1 2020-03-13 07:15:57

surf.bluecrab
Member
From: Halifax, NS, Canada
Registered: 2014-04-19
Posts: 11

Problem booting kernel with GRUB on f2fs

Hi, I am having booting problem and I cannot figure out what the problem is.  It is intermittent on one computer and constant on another and I can't figure out what the problem might be. 

My main system is installed on an ssd in a portable usb enclosure.  I boot the ssd on the computer at work and also my desktop/laptop at home, all with the same portable ssd.  It boots on a console and the graphical environment must be loaded manualy.  It is practical since I bring all my stuff with me and boot my setup on different computers.

My ssd was wearing out so I bought a new one (Samsung_SSD_860_EVO_500GB) and cloned my old setup with a usb live distro called Clonezilla (partclone).  Since I cloned on my new SSD I am having booting problems.

I only have one OS on my ssd, no windows or anything else.

Also, grub is installed on a small 100M partition of its own and my kernel is at its standard place in /boot on 9467ba6e-9825-4839-84e1-a4e0c9cee9f1.

I am using a BIOS system and all the computers I am using are a few years old but all 64bit.  I am not using UEFI but my drive is partitionned with a gpt table for future convertion to UEFI.

sdb                                                                                 
├─sdb1                                                                             
├─sdb2 ext4   1.0   BOOT             d0bdadb6-635f-49ab-b6d6-16856e4680a2   54.2M    33% /mnt/bootloader
├─sdb3 f2fs    1.7   Data_SSD01b b874eb42-765b-4629-ba43-579fec821e1a  225.6G     3% /mnt/DATA_SSD_01
└─sdb4 f2fs   1.12  Arch_01          9467ba6e-9825-4839-84e1-a4e0c9cee9f1  215.7G     7% /

I have no problem booting into GRUB on any machines but GRUB have problem booting linux.  I tried installing grub on a separate usb stick but the same problem happend.

I can boot my laptop no problem but my desktop gives me the error:

{
error: no such device 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
Loading Linux linux ...
error: hd1 cannot get C/H/S values.
Loading initial ramdisk ...
error: you need to load the kernel first.
}

Here is something more interesting:  On my work computer I can boot the system, however when I upgrade the system and I reboot I get the following message:

{
error: no such device 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
Loading Linux linux ...
error: no such partition.
Loading initial ramdisk ...
error: you need to load the kernel first.   
}

** When that happend, I boot the work computer with a live usb stick, mount all my ssd partitions, shutdown, reboot and the system works!

I know that everytime I upgrade the kernel f2fs recheck partitons for errors.

I am wondering why mounting my f2fs partitions from a live usb temporary fix my problem and why on this computer but not on my desktop?  I am wondering if there might be some setting that is wrong somewhere with f2fs?

This is the kind of problem that is very frustrating to figure out.

I have never tried booting manually from the GRUB command line.

Any suggestion on where to look for possible problems would be appreciated.

Offline

#2 2020-03-21 04:24:20

kalix
Member
Registered: 2020-03-06
Posts: 6

Re: Problem booting kernel with GRUB on f2fs

So to start can you provide your grub.cfg (usually located in /boot/grub) ? Also try this https://wiki.archlinux.org/index.php/GR … g_messages and see if you can get grub to tell you whats going on when this happens.

Offline

#3 2020-03-23 15:13:27

surf.bluecrab
Member
From: Halifax, NS, Canada
Registered: 2014-04-19
Posts: 11

Re: Problem booting kernel with GRUB on f2fs

Hello!  Thank you for your reply.  I have booted this problematic setup on my laptop, booted without problems.  I updated my whole system and rebooted into the same "error: no such device" again.  I tried booting up from a backup GRUB for that drive installed on a USB stick and same booting problem happend.

I then booted into the laptop functional setup, mounted the f2fs partitions of my problematic drive, rebooted into that problematic drive and it booted fine.  It seems that mounting the drives on any functional OS fix the booting problem but only for some machine, my desktop never whants to boot that new drive since I cloned my setup on it but used to boot the same setup on the older drive.  I am wondering if GRUB is to blame or if some flag get putted somewhere on the filesystem?

I will try to setup GRUB debuging but in the meantime here is my grub.cfg (It has been made by grubmkconfig from a good boot on that drive, the default boot option is the one that boots this SSD, others is what was on the computer internal HD when I updated grub.cfg so they should be irrelevent to my case":

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_msdos
insmod part_gpt
insmod f2fs
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/blue

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=-1
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=-1
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9467ba6e-9825-4839-84e1-a4e0c9cee9f1' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod f2fs
        set root='hd1,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/(null)/sas/disk@0,gpt4' --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  9467ba6e-9825-4839-84e1-a4e0c9cee9f1
        else
          search --no-floppy --fs-uuid --set=root 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=9467ba6e-9825-4839-84e1-a4e0c9cee9f1 rw loglevel=3 rootwait loglevel=3 rootwait
        echo    'Loading initial ramdisk ...'
        initrd  /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9467ba6e-9825-4839-84e1-a4e0c9cee9f1' {
        menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9467ba6e-9825-4839-84e1-a4e0c9cee9f1' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod f2fs
                set root='hd1,gpt4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/(null)/sas/disk@0,gpt4' --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                else
                  search --no-floppy --fs-uuid --set=root 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=9467ba6e-9825-4839-84e1-a4e0c9cee9f1 rw loglevel=3 rootwait loglevel=3 rootwait
                echo    'Loading initial ramdisk ...'
                initrd  /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux.img
        }
        menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-9467ba6e-9825-4839-84e1-a4e0c9cee9f1' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod f2fs
                set root='hd1,gpt4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/(null)/sas/disk@0,gpt4' --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                else
                  search --no-floppy --fs-uuid --set=root 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=9467ba6e-9825-4839-84e1-a4e0c9cee9f1 rw loglevel=3 rootwait loglevel=3 rootwait
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux-fallback.img
        }
        menuentry 'Arch Linux, with Linux linux (recovery mode)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-recovery-9467ba6e-9825-4839-84e1-a4e0c9cee9f1' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod f2fs
                set root='hd1,gpt4'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275/(null)/sas/disk@0,gpt4' --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                else
                  search --no-floppy --fs-uuid --set=root 9467ba6e-9825-4839-84e1-a4e0c9cee9f1
                fi
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=9467ba6e-9825-4839-84e1-a4e0c9cee9f1 rw single loglevel=3 rootwait
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux-fallback.img
        }
}

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch Linux (on /dev/sda3)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-171dc2ca-d1ba-4e72-89db-830f01c5cade' {
        insmod part_gpt
        insmod btrfs
        set root='hd0,gpt3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  171dc2ca-d1ba-4e72-89db-830f01c5cade
        else
          search --no-floppy --fs-uuid --set=root 171dc2ca-d1ba-4e72-89db-830f01c5cade
        fi
        linux /boot/vmlinuz-linux root=/dev/sda3
        initrd /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux (on /dev/sda3)' $menuentry_id_option 'osprober-gnulinux-advanced-171dc2ca-d1ba-4e72-89db-830f01c5cade' {
        menuentry 'Arch Linux (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--171dc2ca-d1ba-4e72-89db-830f01c5cade' {
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  171dc2ca-d1ba-4e72-89db-830f01c5cade
                else
                  search --no-floppy --fs-uuid --set=root 171dc2ca-d1ba-4e72-89db-830f01c5cade
                fi
                linux /boot/vmlinuz-linux root=/dev/sda3
                initrd /boot/initramfs-linux.img
        }
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
df

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sdb4       f2fs      250G   19G  232G   8% /
/dev/sdb2      ext4       96M  9.0M   80M  11% /mnt/bootloader
/dev/sdb3       f2fs      251G  6.6G  244G   3% /mnt/DATA_SSD_01
/dev/disk/by-uuid

lrwxrwxrwx 1 root root 10 2020-03-23 11:53 171dc2ca-d1ba-4e72-89db-830f01c5cade -> ../../sda3
lrwxrwxrwx 1 root root 10 2020-03-23 11:53 44533e83-8f62-4117-9e69-cc51b611a649 -> ../../sda4
lrwxrwxrwx 1 root root 10 2020-03-23 11:53 5d401414-f165-4215-b9d3-d812731c0abb -> ../../sda5
lrwxrwxrwx 1 root root 10 2020-03-23 11:53 9467ba6e-9825-4839-84e1-a4e0c9cee9f1 -> ../../sdb4
lrwxrwxrwx 1 root root 10 2020-03-23 11:53 b0140414-3ce7-4961-8bbf-7f3294c53451 -> ../../sda2
lrwxrwxrwx 1 root root 10 2020-03-23 11:54 b874eb42-765b-4629-ba43-579fec821e1a -> ../../sdb3
lrwxrwxrwx 1 root root 10 2020-03-23 11:53 d0bdadb6-635f-49ab-b6d6-16856e4680a2 -> ../../sdb2

Thanks for your help! smile

Last edited by surf.bluecrab (2020-03-23 15:20:04)

Offline

Board footer

Powered by FluxBB