PDA

View Full Version : [kubuntu] Full installation on USB external hard drive



RyuTesla
April 26th, 2010, 06:44 PM
I am trying to do a full install on a USB external hard drive, and I keep running into a problem.

I disconnect my internal Windows hard drive first. Then run the installer from the Desktop CD. Everything works great.

This is approximately the steps I take: I reboot, everything is good. I reconnect my internal hard drive, boot to Windows, reboot back to Kubuntu, everything is still good. I run updates and follow the instructions of the Comprehensive Multimedia & Video Howto (http://ubuntuforums.org/showthread.php?t=766683). I reboot again, still no problems. At this point, I figure everything is OK and I have no worries. I boot to Windows and do some work in that environment. The next time I boot to the external Kubuntu hard drive, I get the following errors:

Begin: Starting AppArmor profiles ...
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
Done.
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init= bootarg.

Someone suggested to me that the problem was that, being a USB drive, it was getting assigned a different device label (sdf1 instead of sda1, or something like that) on the reboot, and to try usb-creator. The problem is with usb-creator, it makes a Live-USB that puts all my /Root and /Home files into a RAM disk, wasting my available memory, and limiting me on how much I can install.

I also did not have this problem with Ubuntu v8.10 and v9.04. Only after I upgraded to v9.10 has this been a problem.

Can anyone help me with this?

P4man
April 26th, 2010, 06:49 PM
can you check the contents of /etc/fstab and post it here?
Im wondering if your drive is referenced by uuid or as /dev/sdX.
If its the latter, I agree with your friend that that might be the cause.

edit: disregard. I need the contents of your grub.cfg of course! Is this grub 1 or 2, and is it on the usb drive or hdd ?

Another, perhaps, silly suggestion: do you have any USB keys plugged in that you didnt have plugged in before (or vice versa) ? USB camera's or MP3 players etc also count !

RyuTesla
April 26th, 2010, 11:48 PM
I wish I could give you the contents of my grub.cfg.

I currently have the hard drive set up with the results of running usb-creator-kde, which is why I know that it makes a RAM disk with all the installed programs residing there (I've nearly used all my 4GB of memory.)

I can re-install again. I've no data to lose on the hard drive. Then wait again for the error.

As for other USB devices, I have 4 other USB hard drives which may be on at any time. One I use for my primary data storage drive. That one might be left on between booting from the internal Window hard drive to the external USB Kubuntu drive.

Since the internal is disconnected during Kubuntu install, grub is located on the external USB hard drive.

C.S.Cameron
April 27th, 2010, 01:51 AM
9.10 if installed from scratch is using grub2, It would be interesting to check your grub.cfg before and after to see if it is changing.
I think it is using uuid's which should not change or be confused with the uuid of another drive.

P4man
April 27th, 2010, 07:14 AM
well, lets see whats in grub then. If its using uuids, it should work no matter which drives you have connected. if its using /dev/sdx then it might well get confused when the drives change.

Boot from a livecd. Access the USB drive on which you installed (k)ubuntu. Browse to /pathtoyourdrive/boot/grub (note, not /boot/grub as that is the livecd filesystem!). Open grub.cfg and post the contents here.

note that ubuntu 9.10 uses grub2 by default, where as the other versions used grub 1, so im pretty sure the problem is there somewhere.

RyuTesla
April 27th, 2010, 09:13 AM
Well, reinstalled Kubuntu. This time, when I reconnected my internal hard drive then booted to Kubuntu, I got the error again. I disconnected the internal hard drive and could boot to the external USB hard drive correctly.

Here is my grub.cfg contents:

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

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-21-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
linux /boot/vmlinuz-2.6.31-21-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry "Ubuntu, Linux 2.6.31-21-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
linux /boot/vmlinuz-2.6.31-21-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

Not sure what I am looking for, but I did notice /dev/sda1 listed 4 times.

hemmi7
May 7th, 2010, 09:14 AM
Hello

I have a very similar Problem that I am at the moment working on in this GERMAN Thread:

http://forum.ubuntuusers.de/topic/installation-auf-einer-externen-festplatte-bo/#post-2444513

My current guess is, that it is the cache of the external hard disk.

I can always boot once, when trying a second time, it doesn't work. EXEPT: I switch off the Laptop without shutting down.

I guess, that ubuntu writes the last data to the usb device. When done so, it shuts down, while the usb drive is still writing it's cache to the disk. --> this leads to errors in the file system.

Hope I could help you.

Gr hemmi7