PDA

View Full Version : [xubuntu] Installing on external hard drive



bmw1000
February 9th, 2012, 06:57 AM
I have windows XP and I installed xubuntu 11.04 onto an external usb hard drive (I installed from a USB live system)

When I try to boot it i get this message


Unknown filesystem
grub rescue >
Here is my grub.cfg:


#
# 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 ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root 92218aae-e272-4976-8018-81fadecc5adc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root e4a9e54a-ded6-44a3-bba8-36bb9f43df3c
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root e4a9e54a-ded6-44a3-bba8-36bb9f43df3c
linux /vmlinuz-2.6.38-8-generic root=UUID=92218aae-e272-4976-8018-81fadecc5adc ro quiet splash vt.handoff=7
initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root e4a9e54a-ded6-44a3-bba8-36bb9f43df3c
echo 'Loading Linux 2.6.38-8-generic ...'
linux /vmlinuz-2.6.38-8-generic root=UUID=92218aae-e272-4976-8018-81fadecc5adc ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root e4a9e54a-ded6-44a3-bba8-36bb9f43df3c
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set=root e4a9e54a-ded6-44a3-bba8-36bb9f43df3c
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

I have a swap partition,a boot partition and a root partition set up for xubuntu.
I have tried changing all the hd1 entries in grub.cfg to /dev/sda and /dev/sdb and /dev/sdc, doesn't work.
In the grub rescue > bit, i type ls (hd0) it says unknown filesystem
also tried (hd1) same result.
Can anyone help?

bmw1000
February 9th, 2012, 08:01 PM
I need help its urgent!

oldfred
February 10th, 2012, 02:17 AM
Having a separate /boot on normal desktops makes it a bit more difficult to fix as you always have to mount both /boot and / (root). Normally servers or similar setups with RAID or LVM may need /boot or very old BIOS that can only boot from the first 137GB of a drive. If you system is more than 6 or 7 years old that may be a problem if the /boot was not fully in the first 137GB. But then you probably cannot boot USB devices.

You normally should not be editing things as now it may be very confused. Ubuntu mostly uses UUIDs so it does not matter which device it is. Did you install grub2's bootloader to the external drive and can you boot from the external with settings in BIOS.

In liveCD download and run this. It may fix minor issues, but with the changes already done maybe not. If it cannot fix it run the boot info script and post the link it provides.

Boot Repair:
https://help.ubuntu.com/community/Boot-Repair
You can repair many boot issues with this or post the link to a run of boot info script so we can see your exact configuration.

bmw1000
February 10th, 2012, 03:25 AM
Having a separate /boot on normal desktops makes it a bit more difficult to fix as you always have to mount both /boot and / (root). Normally servers or similar setups with RAID or LVM may need /boot or very old BIOS that can only boot from the first 137GB of a drive. If you system is more than 6 or 7 years old that may be a problem if the /boot was not fully in the first 137GB. But then you probably cannot boot USB devices.

You normally should not be editing things as now it may be very confused. Ubuntu mostly uses UUIDs so it does not matter which device it is. Did you install grub2's bootloader to the external drive and can you boot from the external with settings in BIOS.

In liveCD download and run this. It may fix minor issues, but with the changes already done maybe not. If it cannot fix it run the boot info script and post the link it provides.

Boot Repair:
https://help.ubuntu.com/community/Boot-Repair
You can repair many boot issues with this or post the link to a run of boot info script so we can see your exact configuration.
Thanks for reply.

I do not want to use that boot-repair as I am scared it will overwrite my windows bootloader... D:
However, I will try to reinstall xubuntu on my external hard drive and only use one partition and swap area. I will post results shortly.

bmw1000
February 10th, 2012, 03:55 AM
It still says Unknown filesystem... i am using ext4 is it not supported??
Or maybe this is the problem:
The hard drive has a NTFS partition as I do not want to use the whole drive for xubuntu, maybe it doesnt like the NTFS partition...

Also, what partition has to be active??? the root partition? I made the root partition active.

Also when i set up the partitions when installing, does it matter what partitions are logical/primary? I made the root partition primary and the swap logical.
I installed grub2 to the external hard drive, and I can boot from USB hard drive with BIOS, but as I said before it says unknown filesystem.

bmw1000
February 10th, 2012, 07:10 AM
here is boot-repair log:
http://paste.ubuntu.com/836206/

note: the wubildr stuff in sda is nothing its old

oldfred
February 10th, 2012, 04:07 PM
I do not see anything wrong with boot script. You have an extra grub.cfg in sdc1, but it should not make any difference. The extra one does mention sdb, so it looks like your flash drive is inserted as sdb and USB drive as sdc, but was sdb at one time. Since Ubuntu uses UUIDs, drive order should not matter, but you may want to be consistent about order plugging it in. Try without flash drive but I do not expect any difference.

Sometimes just reinstalling grub2 to the MBR helps. But check on whether it is sdb or sdc.

#Comments are anything after the #, enter commands in terminal session
#Install MBR from LiveCD/usb, Ubuntu install on sdc3 and want grub2's bootloader in drive sda's MBR:
#Find linux partition, change sdc3 if not correct:
sudo fdisk -l
#confirm that linux is sdc3
sudo mount /dev/sdc3 /mnt
#If grub 1.99 with Natty or later uses boot not root.
sudo grub-install --boot-directory=/mnt/boot /dev/sdc

# If no errors on previous commands reboot into working system and run this:
sudo update-grub

bmw1000
February 10th, 2012, 08:01 PM
I do not see anything wrong with boot script. You have an extra grub.cfg in sdc1, but it should not make any difference. The extra one does mention sdb, so it looks like your flash drive is inserted as sdb and USB drive as sdc, but was sdb at one time. Since Ubuntu uses UUIDs, drive order should not matter, but you may want to be consistent about order plugging it in. Try without flash drive but I do not expect any difference.

Sometimes just reinstalling grub2 to the MBR helps. But check on whether it is sdb or sdc.

#Comments are anything after the #, enter commands in terminal session
#Install MBR from LiveCD/usb, Ubuntu install on sdc3 and want grub2's bootloader in drive sda's MBR:
#Find linux partition, change sdc3 if not correct:
sudo fdisk -l
#confirm that linux is sdc3
sudo mount /dev/sdc3 /mnt
#If grub 1.99 with Natty or later uses boot not root.
sudo grub-install --boot-directory=/mnt/boot /dev/sdc

# If no errors on previous commands reboot into working system and run this:
sudo update-grub
Thanks for reply.
The drive is /dev/sdc When its in the liveCD, but at boot time it will be /dev/sdb because it is the 2nd drive. The extra grub.cfg was a backup.
I reinstalled grub2, it still says unknown filesystem...

oldfred
February 10th, 2012, 08:12 PM
I do not see anything wrong. Sometime BIOS settings can make a difference, but most portables do not have much in the way of settings you can change.

All I can suggest is reviewing this list of things others have posted as what they had to do to make it work. If using XP changing to ACHI will prevent XP from booting and it is a real hassle to make XP work with ACHI, so try that last if at all. I changed to ACHI and boot XP so rarely that changing it back once in a blue moon is ok for me.

Some issues on booting install:
fixed the problem by adding rootdelay to grub.cfg this allows time for the usb drive to load.
BIOS settings need USB mouse & keyboard
BIOS in not updated to latest revision
BIOS not set to boot CD or USB first
BIOS shows floppy or firewire and you do not have those
changing newer BIOS SATA 6 Gbit/s from 6 Gbs to a SATA II - 3Gbs
BIOS & disable "Boot Sector Virus Protection"
Other BIOS settings - Security or locked down Boot sector, Bitlocker
core unlocker feature on asus m4a87td usb3 was causing the problem
Old BIOS, new drive 137GB max boot size
NTFS partition needs chkdsk, gparted will not see drive if chkdsk flag set, flag is set on resize
Raid meta data on drive - even if one drive (Vendor happend to set it on)
Old gpt data on drive
Disable Quickboot in BIOS
BIOS setting, Keyboard response in grub really slow
Fast Boot setting prevents keyboard from working & other issues
Bios not loading no key works - disconnected power for about 10-15 minutes and the bios reset itself.
After update, It had reset to the BIOS defaults, setting the video to ONBOARD and switching off the dynamic video memory allocation (manually allocating 32Mb instead of leaving it as AUTO).
The mode for the disc was set to AUTO. Changed it to LBA. Then it worked.
Sometimes specific issues by motherboard like this:
[Natty] Marvell 88SE9120 IDE-Part not working
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/777325
External drive needed separate power supply

In the Asus BIOS I selected Advanced Mode>Advanced>SATA Configuration.
Changed IDE Mode to AHCI Mode
Then,when the SATA3G_1 selection appears in the drive list below,select the Enabled option.

Large external drive still needed /boot at beginning:
http://ubuntuforums.org/showthread.php?t=1888497

It was in the BIOS. Under Onboard Devices Settings, the SATA Mode was set to SATA. I changed it to AHCI. Then another line showed up in the BIOS that stated "Change the AHCI DID for Linux to Enabled. I booted to win7 and it loaded some new drivers. I booted to Gpart and glory be there were my hard drives.

bmw1000
February 11th, 2012, 04:37 AM
Thanks for reply.
On the hard drive, on the NTFS partition was a 114GB backup, i am going to try move it to another hard drive and reinstall using the whole drive. If that does not work I will try your suggestions.

bmw1000
February 11th, 2012, 07:36 AM
Ok I reinstalled using the whole hard drive and I got "Out of disk", i googled and someone said to make the partition smaller, so I did now it comes up with the grub command line thing, so i type:


set root=(hd0,1)
set prefix=(hd0,1)/boot/grub/
insmod /boot/grub/linux.mod
linux /boot/vmlinuz-2.6.38-8-generic
initrd /boot/initrd.img-2.6.38-8-generic
boot


then it starts booting then stops saying:


mount: can't read '/etc/fstab': no such file or directory

fstab DOES exist as I have checked, i have tried doing fsck on the disk, still doesnt work.

oldfred
February 11th, 2012, 03:54 PM
Have you tried Boot-Repair again. And if it does not work run the boot info script and post link.

bmw1000
February 11th, 2012, 06:56 PM
ok will do that

bmw1000
February 11th, 2012, 07:22 PM
Aha! That worked! Im using the xubuntu on my external hard drive now!

Thanks oldfred!

oldfred
February 11th, 2012, 08:29 PM
Glad you go it resolved.:)