# Kernel Panic When Booting Asus Netbook With SD Card Inserted

## fredbear5150

My Asus 1215n netbook has three partitions for /boot, swap and / - partitions sda1, sda2 and sda3 respectively. I have GRUB2 and openrc installed.

The machine has an internal SD card slot, I normally keep a 32GB FAT SD card in the slot.

The netbook boots fine when the SD card is not inserted, but I get a kernel panic on boot when the SD card is inserted. Otherwise the SD card and slot are fine if I use them after booting up.

The kernel panic reports "Kernel Panic - not syncing: VFS: unable to mount root fs on unknown-block(8,3)", just above that it indicates that the three hard disk partitions have been assigned sdb1, sdb2, sdb3 IDs, the SD card has been assigned the sda1 ID. I have made a number of changes in the BIOS to try to force the hard disk to be detected first as sda, it is always detected as sdb when the SD card is inserted.

grub.cfg clearly has the root filesystem accessed via the Partition ID, I have also taken out references to sda in /etc/fstab and instead mount by UUID. As I said above, with the SD card out, everything boots fine.

I am beginning to think this is just down to a crappy BIOS that won't let me change the boot/detection order of the disks, but can anyone suggest anything else to try? It's a minor issue, I know, but it would be nice to get to the root cause if possible.

----------

## Roman_Gruber

Usually you set the boot order or boot device in the bios / uefi bios.

and when you want to prevent mixing up the naming of teh boot device, you should, hardcode the uuid in the kernel itself, or in the bootloader. 

you may check with the grub command line how the devices are named when there is that sdcard inserted.

----------

## fredbear5150

 *tw04l124 wrote:*   

> Usually you set the boot order or boot device in the bios / uefi bios.
> 
> and when you want to prevent mixing up the naming of teh boot device, you should, hardcode the uuid in the kernel itself, or in the bootloader. 
> 
> you may check with the grub command line how the devices are named when there is that sdcard inserted.

 

The boot order is already set in the BIOS, it is not a UEFI netbook.

I have hardcoded the UUID into the kernel, and double-checked it. I haven't set it to override anything set by GRUB, that might be worth a try, although the GRUB config does also reference the UUID, as does /etc/fstab.

I will see what GRUB options there are, I see some "hint" settings that reference physical disks, maybe I need to read up on what those do.

But thanks for the advice.

----------

## Roman_Gruber

usually something like this

realroot=UUID=... What i saw last time, what someone else posted in another topic.

on uefi, i need to force grub2 to tell the uiid for the krnel and intiramfs image, and than force the uuid for the realroot stuff. Basically force everything, with realrootfs=ext4, lvm, ro .... or what it is called and such ...

You can edit grub2 on the fly temporarily and try booting it, just in case take pen and paper and make notes before you make temporarily changes. This is my try and error approach, until I realize what may be wrong.

----------

## Logicien

If Grub see /boot, swap and / as (hd0,1), (hd0,2) and (hd0,3) when you have no Sd card in, it will see the same partitions as (hd1,1), (hd1,2) and (hd1,3) when an Sd card is in. This must be reflect in the Grub configuration file.

You can create a specific Grub menu entry who will use hd1 instead of hd0 when an Sd card is in.

----------

