You are not logged in.

#1 2012-06-25 21:06:33

athal
Member
Registered: 2012-05-29
Posts: 16

Failed booting from external usb hdd

Hey Community!

I struggle at backing up my arch linux operation system. I found this instruction but for newbies as me it seems to be a little bit hard to follow:
Full_System_Backup_with_rsync

The backup itself with rsync and the installation of GRUB bootloader seemed to be successful, but if I plug in the external hdd in another PC and boot from it, GRUB fails with ERROR 21.

I think, that my menu.lst is somehow incorrect. What I did:

full rsync to /mnt/usbHDD (mounted from /dev/sdb1)

my external hard disk is partitioned like that:

|| 160 gb ext4, sdb1 | UNUSED rest ||

blkid gives me that:

/dev/sda1: UUID="8f7f3e77-8acb-4724-862a-6c9678cadd29" TYPE="ext2" 
/dev/sda2: UUID="c21b9563-ebf9-4b28-882d-fd8322693627" TYPE="swap" 
/dev/sda3: UUID="78aad592-62d5-4752-8e04-50f17ff19705" TYPE="ext4" 
/dev/sda4: UUID="b5cba3a9-5009-485f-b53c-6be526b51f55" TYPE="ext4" 
/dev/sdc1: LABEL="storageHDD" UUID="49afd07d-1c11-448f-9b06-f7477cbe1b7c" TYPE="ext4"

The /etc/fstab of the original OS is:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
UUID=78aad592-62d5-4752-8e04-50f17ff19705 / ext4 defaults 0 1
UUID=8f7f3e77-8acb-4724-862a-6c9678cadd29 /boot ext2 defaults 0 1
UUID=b5cba3a9-5009-485f-b53c-6be526b51f55 /home ext4 defaults 0 1
UUID=c21b9563-ebf9-4b28-882d-fd8322693627 swap swap defaults 0 0

The /boot/grub/menu.lst of the original OS is:

# general configuration:
timeout   5
default   0
color light-blue/black light-cyan/blue

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/78aad592-62d5-4752-8e04-50f17ff19705 ro
initrd /initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/78aad592-62d5-4752-8e04-50f17ff19705 ro
initrd /initramfs-linux-fallback.img

----------------------------------------------

The /etc/fstab of the backed up (on hdd) OS is:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
UUID=78aad592-62d5-4752-8e04-50f17ff19705 / ext4 defaults 0 1
UUID=8f7f3e77-8acb-4724-862a-6c9678cadd29 /boot ext2 defaults 0 1
UUID=b5cba3a9-5009-485f-b53c-6be526b51f55 /home ext4 defaults 0 1
UUID=c21b9563-ebf9-4b28-882d-fd8322693627 swap swap defaults 0 0

The /boot/grub/menu.lst of the backed up (on hdd) OS is:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sdb1 ro
initrd /initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sdb1 ro
initrd /initramfs-linux-fallback.img

I don't have a clue what to change, since it is not clearly specified in the wiki...I followed exactly the instructions in the wiki, besides the include and excludes for rsync but that doesnt really matter wink
Appreciate your help smile

Last edited by athal (2012-06-25 21:09:16)

Offline

#2 2012-06-25 21:30:00

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: Failed booting from external usb hdd

You should adapt the menu.lst of the backed up OS like this:

# (0) Arch Linux
title  Arch Linux
root   (hd1,0)
kernel /boot/vmlinuz-linux root=/dev/sdb1 ro
initrd /boot/initramfs-linux.img

explanation:
- Your root should be (hd1,0) because the external disc is the second hard disc (assuming root=/dev/sdb1 is correct).
- The kernel and initrd line should have /boot, because you don't have a seperate boot partition.

Also, you didn't adapt your fstab of the backed up hard disk. In particular, you have to remove the entries for /boot, /home and swap. The entry of root file system is also wrong, because you still have the old UUID in it:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
/dev/sdb1 / ext4 defaults 0 1

Finally, I think not following the excludes in the wiki will also cause problems.

Offline

#3 2012-06-26 06:31:41

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Failed booting from external usb hdd

Only the root partition needs a "1" at the end in /etc/fstab, everything else should have either "2" or "0":

https://wiki.archlinux.org/index.php/Fs … efinitions
https://wiki.archlinux.org/index.php/Be … tc.2Ffstab

This is the 5th time this month that I saw this. How are you guys reading it wrong? I don't get it.


Post the output of "fdisk -l", because blkid doesn't seem to know any /dev/sdb drives.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB