Friday, March 20, 2009

Choose the correct disk to boot...

I was having some troubles while booting the device as I have two more disks attached to the slug other than the booting flash drive. It was basically looking for the wrong drive to boot so it was hanging during the boot. You can actually solve the sittuation by mounting the drives after the boot as I did before but this is a server right :)

To avoid confusion boot without any other disk attached then find out the UUID's of your disk partitions. fdisk -l will help you to see your existing partitions. To find UUID's of your partitions write:
# vol_id /dev/sda1
# vol_id /dev/sda2
# vol_id /dev/sd...


I had a problem with my swap partition. I saw that it had no UUID. If you encounter a situation like this follow :

# swapoff -a
# mkswap /dev/sdXX
replace XX according to your system.I wrote mkswap /dev/sda5 for my system. Then type
# swapon -a
to make te swap partition active again...


Apply the vol_id /dev/sdXX for all your partitions and look for "ID_FS_UUID = ..." . The long alphanumeric string is important for us. After learning the UUID's of all your partitions modify your /etc/fstab as seen on the screenshot.

Almost done. You also have to modify the kernel as it looks for the booting device before fstab. To do this simply write. (backup your existing flash vefore this. Read previous post)
apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug root=/dev/disk/by-uuid/XXXXXX'

change the XXXXXX section with the UUID of your root partition. For my case I wrote :
apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug root=/dev/disk/by-uuid/e41f5b0d-1b1b-4e84-a2db-a70e2355c8db'


That is all.Plug all your drives and restart to see if it starts without any complain...

3 comments:

  1. Thanks. This helped loads! I was also getting freaky troubles with slug (Debian installed on 2 gig flash drive attached to USB1) when I attached other drives (USB2 coonestec with hub).I am trying to reduce the writes to the flash drive. I have noatime option on home (exaclty as you have) but I get kjournald writes to the flash drive every 10s still! How can I stop this? I tried to change to ext2 so there is no journalling, but messed up the OS.....
    Thanks
    zcat

    ReplyDelete
  2. Unfortunately I do not know the solution. If you already messed up you would consider installing debian again. This time prepare the disk/partitions on another system as you would like. But do not use an unsupported file system by default. I am not sure if XFS is supported by default though. Cheers...

    ReplyDelete
  3. it's " and NOT '
    thanks for the guide!

    ReplyDelete