LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2008, 12:53 PM   #16
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49

Unfortunately the output of that script is obviously not valid in your case; what error did you get when you ran the original script? Please copy/paste the terminal session with the error if possible. In case you can't get it to run, how about instead posting:
Code:
sudo fdisk -lu
Also, for each of the drives fdisk lists, like sda, sdb, etc, please post the output of:
Code:
sudo xxd  -l  2 -p /dev/sda
So replace "sda" above with each of your drives. Note "-l" is a lowercase L, not a one. And finally, for each command above that returns "eb48", please post:
Code:
sudo xxd -s 1049 -l 2 -p /dev/sda
And replace sda with the drives that previously returned "eb48". That will help clarify what your setup is like.

Last edited by CJS; 12-17-2008 at 12:54 PM.
 
Old 12-17-2008, 01:06 PM   #17
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
I just noticed in the Desktop directory, a file named 'grub file content'. If you need that I can post it but it looks like plain vanilla - something I acquired when I installed Ubuntu.
 
Old 12-17-2008, 01:17 PM   #18
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
I think the following is complete - i.e. what you requested.

dick@dick-Foothills:~$ sudo fdisk -lu
[sudo] password for dick:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa7a57e45

Device Boot Start End Blocks Id System
/dev/sda1 63 12746159 6373048+ b W95 FAT32
/dev/sda2 * 12746160 217546559 102400200 7 HPFS/NTFS
/dev/sda3 312560640 312575759 7560 83 Linux
/dev/sda4 217546560 218060639 257040 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01394e34

Device Boot Start End Blocks Id System
/dev/sdb1 63 6779429 3389683+ 83 Linux
/dev/sdb2 6779430 390716864 191968717+ 5 Extended
/dev/sdb5 382379193 390716864 4168836 82 Linux swap / Solaris
/dev/sdb6 6779556 13317884 3269164+ 83 Linux
/dev/sdb7 374041458 382379129 4168836 82 Linux swap / Solaris
/dev/sdb8 13317948 365703659 176192856 83 Linux
/dev/sdb9 365703723 374041394 4168836 82 Linux swap / Solaris

==========================================

dick@dick-Foothills:~$ sudo xxd -l 2 -p /dev/sda
eb48
dick@dick-Foothills:~$ sudo xxd -l 2 -p /dev/sdb
33ff

==========================================


dick@dick-Foothills:~$ sudo xxd -s 1049 -l 2 -p /dev/sda
0781

==========================================

Please let me know if you need anything else.
 
Old 12-17-2008, 01:22 PM   #19
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Sorry -- I forgot to answer the first question:

ick@dick-Foothills:~$ sudo sh ~/Desktop/boot_info9.txt
sh: Can't open /home/dick/Desktop/boot_info9.txt
 
Old 12-17-2008, 02:25 PM   #20
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, that helps clarify quite a bit. But how about trying one more time though to run that script; make sure it is downloaded to your Ubuntu desktop as "boot_info9.txt", and try this instead:
Code:
cd ~/Desktop
sudo sh ./boot*
And let me know if that works. It would help a lot if I can see the output of that script, because it will give a more detailed analysis of your setup and help us avoid problems.

But according to the output of the commands you ran, you currently have Grub installed to the MBR of your Windows sda drive, and Grub looks on the second boot drive in the 8th partition for its boot files, which would be sdb8. So in order to install Grub to your sdb USB drive, how about doing:
Code:
sudo grub
grub> root (hd1,0)
grub> makeactive
grub> root (hd1,7)
grub> setup (hd1)
grub> quit
And please post the output of all the above commands. In case you are curious, the first two Grub commands above set the boot flag on your sdb1 partition. Your sdb drive currently doesn't have the boot flag set on any partitions, and some BIOSes will refuse to boot a drive that doesn't have the boot flag set on one primary partition (the BIOS assumes the drive is then a data drive). So even though Grub doesn't care whether the boot flag is set in order to boot a partition, it is a good idea to make sure your sdb drive has the boot flag set on a primary partition so that your BIOS doesn't balk at booting the drive. The last two Grub commands above install Grub to the MBR of your sdb drive.

Next, to restore your Windows MBR to the sda drive, you can do:
Code:
sudo lilo -M  /dev/sda mbr
Then reboot, and if you set your BIOS to boot the sdb Ubuntu drive, you should get a Grub menu. Let me know if you can get that far or if you run into problems.

Last edited by CJS; 12-17-2008 at 03:27 PM.
 
Old 12-17-2008, 03:46 PM   #21
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
OK, here we go. I have copied all the outputs per your instructions and they are displayed below:

dick@dick-Foothills:~$ cd ~/Desktop
dick@dick-Foothills:~/Desktop$ sudo sh boot*
[sudo] password for dick:
sh: Can't open boot*

=============================

I did not capture the output of the 'grub' commands because 'quit' erased the terminal display. However, it stated that commands succeeded.

=============================

dick@dick-Foothills:~/Desktop$ sudo lilo -M /dev/sda mbr
Backup copy of /dev/sda in /boot/boot.0800
The Master Boot Record of /dev/sda has been updated.

=============================
=============================

When I reboot I get the message:

Grub loading stage 1.5
Grub loading, please wait
Error 5

If I indicate the internal drive on the Boot Menu it boots directly into Windows. If I indicate the USB drive I do get the menu. I did not try setting the BIOS to either of those values, although, the internal drive was previously set to be the primary drive.

Where do we go from here?
 
Old 12-17-2008, 03:58 PM   #22
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by dickgb View Post
When I reboot I get the message:

Grub loading stage 1.5
Grub loading, please wait
Error 5

If I indicate the internal drive on the Boot Menu it boots directly into Windows. If I indicate the USB drive I do get the menu. I did not try setting the BIOS to either of those values, although, the internal drive was previously set to be the primary drive.

Where do we go from here?
I don't think I fully understand, please correct me if I'm wrong: if you boot the sda Windows drive, you go directly into Windows, and if you boot your USB drive, you do get the Grub menu? If so, can you boot into Ubuntu on your USB drive from the Grub menu? Or when do you get the Grub error 5? We could really use the output of that script to help our troubleshooting; prior to your last message I realized I made a small mistake with those commands (I didn't include the ./ in front of the boot*), so please try again with:
Code:
cd ~/Desktop
ls -l
sudo sh ./boot*
And let me know what the output is of all the above commands. We can work from there.

Last edited by CJS; 12-17-2008 at 04:00 PM.
 
Old 12-17-2008, 04:15 PM   #23
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
When I completed all the operations I rebooted. After the HP initial screen it displayed the 2 lines followed by the Error 5. When I turned the power off and back on I interrupted the process and hit the Escape key which brought up the Boot Menu. I highlighted the Internal Drive and it booted directly into Windows. I repeated the process and highlighted the USB drive and it then displayed the menu and I was then able to boot Ubuntu by either letting it default or by selection. Does this clarify the issue or am I still being vague?

dick@dick-Foothills:~$ cd ~/Desktop
dick@dick-Foothills:~/Desktop$ ls -l
total 0

dick@dick-Foothills:~/Desktop$ sudo sh ./boot*
[sudo] password for dick:
sh: Can't open ./boot*
 
Old 12-17-2008, 05:24 PM   #24
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, thanks for clarifying, I'm still wondering though which drive is returning the Grub error 5. You mentioned previously that the Windows drive was set to be the primary drive, so does that mean you have the BIOS set to boot the Windows drive before the other drives? In other words, which drive is being booted on start up and returning the Grub error 5? Because it sounds like everything else is working as planned: if you boot the Windows drive you get Windows, and when you boot the Ubuntu drive you get Ubuntu. That's what you wanted, true? We can still add an entry in your Ubuntu's Grub menu to boot the Windows drive if you like.

Also, according to the "ls -l" command you ran, the "boot_info9.txt" file is not currently on your desktop. Did you download that file and save it to your desktop? If you right-click that link to the boot_info9.txt file in my previous post, you can choose "Save Link As..." to save the file to your desktop. How about trying one more time to download and run that script, because it will definitely help clarify your setup. Let me know if you still run into problems though.
 
Old 12-17-2008, 07:19 PM   #25
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Well, I finally got my act together and here is in all its endless glory, but first, I am pretty sure that the Grub error 5 is coming from the USB drive.

=========================================

Lilo is installed in the MBR of /dev/sda
Grub is installed in the MBR of /dev/sdb and looks on the same drive in partition #8 for its boot files.
No known boot loader is installed in the MBR of /dev/sdc
No known boot loader is installed in the MBR of /dev/sdd
No known boot loader is installed in the MBR of /dev/sde
No known boot loader is installed in the MBR of /dev/sdf
No known boot loader is installed in the MBR of /dev/sdg

sda1:
File system: vfat
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present: /boot.ini /ntldr /NTLDR /NTDETECT.COM /ntdetect.com

sda2:
File system: ntfs
Boot sector type: XP
Boot sector info: According to the info in the boot sector, sda2 starts at sector 12746160
Operating System:
Boot files/directories present:

sda3:
File system: ext2
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present:

sda4:
File system: ext2
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present: /grub/menu.lst /grub

sdb1:
File system: ext3
Boot sector type: Unknown
Boot sector info:
Operating System: Linux
Boot files/directories present: /boot

sdb2:
File system:
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present:

sdb5:
File system: swap
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present:

sdb6:
File system: ext3
Boot sector type: Unknown
Boot sector info:
Operating System: Linux
Boot files/directories present: /boot

sdb7:
File system: swap
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present:

sdb8:
File system: ext3
Boot sector type: Unknown
Boot sector info:
Operating System: Linux
Boot files/directories present: /boot/grub/menu.lst /boot /boot/grub

sdb9:
File system: swap
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/directories present:


Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa7a57e45

Device Boot Start End Blocks Id System
/dev/sda1 63 12746159 6373048+ b W95 FAT32
/dev/sda2 * 12746160 217546559 102400200 7 HPFS/NTFS
/dev/sda3 312560640 312575759 7560 83 Linux
/dev/sda4 217546560 218060639 257040 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01394e34

Device Boot Start End Blocks Id System
/dev/sdb1 * 63 6779429 3389683+ 83 Linux
/dev/sdb2 6779430 390716864 191968717+ 5 Extended
/dev/sdb5 382379193 390716864 4168836 82 Linux swap / Solaris
/dev/sdb6 6779556 13317884 3269164+ 83 Linux
/dev/sdb7 374041458 382379129 4168836 82 Linux swap / Solaris
/dev/sdb8 13317948 365703659 176192856 83 Linux
/dev/sdb9 365703723 374041394 4168836 82 Linux swap / Solaris

Partition table entries are not in disk order
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start= 63, size= 12746097, Id= b
/dev/sda2 : start= 12746160, size=204800400, Id= 7, bootable
/dev/sda3 : start=312560640, size= 15120, Id=83
/dev/sda4 : start=217546560, size= 514080, Id=83
# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start= 63, size= 6779367, Id=83, bootable
/dev/sdb2 : start= 6779430, size=383937435, Id= 5
/dev/sdb3 : start= 0, size= 0, Id= 0
/dev/sdb4 : start= 0, size= 0, Id= 0
/dev/sdb5 : start=382379193, size= 8337672, Id=82
/dev/sdb6 : start= 6779556, size= 6538329, Id=83
/dev/sdb7 : start=374041458, size= 8337672, Id=82
/dev/sdb8 : start= 13317948, size=352385712, Id=83
/dev/sdb9 : start=365703723, size= 8337672, Id=82

sda1/boot.ini

[boot loader]

timeout=0

default=C:\CMDCONS\BOOTSECT.DAT

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons


sda4/grub/menu.lst

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=a72323cc-b659-4992-8a19-73ec7f8d525f

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-7-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet


### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows NT/2000/XP
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1


sda4/grub

total 211
drwxr-xr-x 2 root root 1024 2008-12-15 14:57 .
drwxr-xr-x 4 root root 1024 2008-12-17 14:30 ..
-rw-r--r-- 1 root root 197 2008-11-08 15:26 default
-rw-r--r-- 1 root root 30 2008-11-08 15:26 device.map
-rw-r--r-- 1 root root 8108 2008-11-08 15:26 e2fs_stage1_5
-rw-r--r-- 1 root root 7856 2008-11-08 15:26 fat_stage1_5
-rw-r--r-- 1 root root 16 2008-11-08 15:26 installed-version
-rw-r--r-- 1 root root 8712 2008-11-08 15:26 jfs_stage1_5
-rw-r--r-- 1 root root 4703 2008-12-15 14:57 menu.lst
-rw-r--r-- 1 root root 4792 2008-11-09 12:29 menu.lst~
-rw-r--r-- 1 root root 4792 2008-11-09 12:29 menu.lst-mod
-rw-r--r-- 1 root root 16384 2008-11-11 16:13 .menu.lst.swp
-rw-r--r-- 1 root root 7352 2008-11-08 15:26 minix_stage1_5
-rw-r--r-- 1 root root 9756 2008-11-08 15:26 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 2008-11-08 15:26 stage1
-rw-r--r-- 1 root root 121460 2008-11-08 15:26 stage2
-rw-r--r-- 1 root root 9556 2008-11-08 15:26 xfs_stage1_5

sdb1/boot

total 1748
drwxr-xr-x 2 root root 4096 2008-11-08 11:43 .
drwxr-xr-x 20 root root 4096 2008-11-08 12:14 ..
-rw-r--r-- 1 root root 507665 2008-10-24 02:29 abi-2.6.27-7-generic
-rw-r--r-- 1 root root 91364 2008-10-24 02:29 config-2.6.27-7-generic
-rw-r--r-- 1 root root 124152 2008-09-11 14:11 memtest86+.bin
-rw-r--r-- 1 root root 1029585 2008-10-24 02:29 System.map-2.6.27-7-generic
-rw-r--r-- 1 root root 1073 2008-10-24 02:31 vmcoreinfo-2.6.27-7-generic

sdb6/boot

total 1748
drwxr-xr-x 2 root root 4096 2008-11-08 12:26 .
drwxr-xr-x 20 root root 4096 2008-11-08 14:55 ..
-rw-r--r-- 1 root root 507665 2008-10-24 02:29 abi-2.6.27-7-generic
-rw-r--r-- 1 root root 91364 2008-10-24 02:29 config-2.6.27-7-generic
-rw-r--r-- 1 root root 124152 2008-09-11 14:11 memtest86+.bin
-rw-r--r-- 1 root root 1029585 2008-10-24 02:29 System.map-2.6.27-7-generic
-rw-r--r-- 1 root root 1073 2008-10-24 02:31 vmcoreinfo-2.6.27-7-generic

sdb8/boot/grub/menu.lst

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=a72323cc-b659-4992-8a19-73ec7f8d525f

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid a72323cc-b659-4992-8a19-73ec7f8d525f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid a72323cc-b659-4992-8a19-73ec7f8d525f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=a72323cc-b659-4992-8a19-73ec7f8d525f ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid a72323cc-b659-4992-8a19-73ec7f8d525f
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows NT/2000/XP
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1


sdb8/boot

total 11948
drwxr-xr-x 3 root root 4096 2008-11-10 15:52 .
drwxr-xr-x 20 root root 4096 2008-11-08 15:26 ..
-rw-r--r-- 1 root root 507665 2008-11-04 14:00 abi-2.6.27-7-generic
-rw-r--r-- 1 root root 91364 2008-11-04 14:00 config-2.6.27-7-generic
drwxr-xr-x 2 root root 4096 2008-11-11 16:03 grub
-rw-r--r-- 1 root root 8178464 2008-11-10 15:52 initrd.img-2.6.27-7-generic
-rw-r--r-- 1 root root 124152 2008-09-11 14:11 memtest86+.bin
-rw-r--r-- 1 root root 1029585 2008-11-04 14:00 System.map-2.6.27-7-generic
-rw-r--r-- 1 root root 1073 2008-11-04 14:02 vmcoreinfo-2.6.27-7-generic
-rw-r--r-- 1 root root 2244464 2008-11-04 14:00 vmlinuz-2.6.27-7-generic

sdb8/boot/grub

total 240
drwxr-xr-x 2 root root 4096 2008-11-11 16:03 .
drwxr-xr-x 3 root root 4096 2008-11-10 15:52 ..
-rw-r--r-- 1 root root 197 2008-11-08 15:26 default
-rw-r--r-- 1 root root 30 2008-11-08 15:26 device.map
-rw-r--r-- 1 root root 8108 2008-11-08 15:26 e2fs_stage1_5
-rw-r--r-- 1 root root 7856 2008-11-08 15:26 fat_stage1_5
-rw-r--r-- 1 root root 16 2008-11-08 15:26 installed-version
-rw-r--r-- 1 root root 8712 2008-11-08 15:26 jfs_stage1_5
-rw-r--r-- 1 root root 4792 2008-11-09 12:29 menu.lst
-rw-r--r-- 1 root root 4792 2008-11-09 12:29 menu.lst~
-rw-r--r-- 1 root root 16384 2008-11-11 16:13 .menu.lst.swp
-rw-r--r-- 1 root root 7352 2008-11-08 15:26 minix_stage1_5
-rw-r--r-- 1 root root 9756 2008-11-08 15:26 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 2008-11-08 15:26 stage1
-rw-r--r-- 1 root root 121460 2008-11-08 15:26 stage2
-rw-r--r-- 1 root root 9556 2008-11-08 15:26 xfs_stage1_5

StdErr Messages

ls: cannot access /dev/hd?: No such file or directory
xxd: /dev/sdc: No medium found
/dev/sdc: No medium found

sfdisk: cannot open /dev/sdc for reading
xxd: /dev/sdd: No medium found
/dev/sdd: No medium found

sfdisk: cannot open /dev/sdd for reading
xxd: /dev/sde: No medium found
/dev/sde: No medium found

sfdisk: cannot open /dev/sde for reading
xxd: /dev/sdf: No medium found
/dev/sdf: No medium found

sfdisk: cannot open /dev/sdf for reading
xxd: /dev/sdg: No medium found
/dev/sdg: No medium found

sfdisk: cannot open /dev/sdg for reading
ls: cannot access /dev/hd??*: No such file or directory
$LogFile indicates unclean shutdown (0, 0)
Failed to mount '/dev/sda2': Operation not supported
Mount is denied because NTFS is marked to be in use. Choose one action:

Choice 1: If you have Windows then disconnect the external devices by
clicking on the 'Safely Remove Hardware' icon in the Windows
taskbar then shutdown Windows cleanly.

Choice 2: If you don't have Windows then you can use the 'force' option for
your own responsibility. For example type on the command line:

mount -t ntfs-3g /dev/sda2 sda2 -o force

Or add the option to the relevant row in the /etc/fstab file:

/dev/sda2 sda2 ntfs-3g force 0 0
umount: sda2: not mounted
mount: you must specify the filesystem type
/dev/sdb2: unknown volume type
umount: sdb2: not mounted
/dev/sdb5 looks like swapspace - not mounted
mount: you must specify the filesystem type
umount: sdb5: not mounted
/dev/sdb7 looks like swapspace - not mounted
mount: you must specify the filesystem type
umount: sdb7: not mounted
/dev/sdb9 looks like swapspace - not mounted
mount: you must specify the filesystem type
umount: sdb9: not mounted
 
Old 12-17-2008, 08:38 PM   #26
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, that's great you were able to run the script, it clarifies things a lot. Can you go into your BIOS and check the boot order? I would check to make sure the USB drive is set to boot before the internal Windows drive. Did you have any other drives connected when you got the Grub error 5, maybe like a USB pen drive? I don't see how the USB drive can be giving the Grub error 5 if you can boot the USB drive just fine now when selecting it from your BIOS boot menu on start up. How about when you boot the USB drive and get the Grub menu, press "c" to get the Grub shell, and type the following without pressing enter:
Code:
grub> geometry (hd
And press TAB for tab-completion to see a list of your drives, starting with (hd0). Then to see the size and partitions of a drive such as (hd0), use:
Code:
grub> geometry (hd0)
(hd0) should be your USB drive since you are booting it. Based on the info that geometry gives about the other drives though, can you tell me if there are any other drives besides your Windows drive and the USB Ubuntu drive?
 
Old 12-18-2008, 01:09 PM   #27
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Well, I finally got it done - along with arranging to have knee surgery :-)
The BIOS boot order is
1: USB HDD
2: Samsung SP1604N (the internal drive)

There are no other USB drives plugged in.

grub> geometry (hd produced:
drive 0x80: C//H/S = 422/255/63 The number of sectors = 390721967, LBA
Partition number:0, File system is ext2fs partition type 0x83
Partition number:4, File system is unknown partition type 0x82
Partition number:5, File system is ext2fs partition type 0x83
Partition number:6, File system is unknown partition type 0x82
Partition number:7, File system is ext2fs partition type 0x83
Partition number:8, File system is unknown partition type 0x82

grub> geometry (hd0) produced the same thing.

Big mystery why it doesn't boot without going to the BIOS boot order list.
Thank you again for your diligence. It is greatly appreciated. I have been struggling with this problem for a long time and haven't ever gotten this far. I am beginning to understand the process and what is happening. Emphasis on beginning.
 
Old 12-18-2008, 01:35 PM   #28
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
I forgot to post results from 'grub> geometry (hd1)' as follows:

drive 0x81:C/H/S = 1023/63, The number of sectors = 312581808, LBA
partition num: 0, File System is fat, partion type 0xb
partition num: 1, File System is unknown, partion type 0x7
partition num: 2, File System is ext2fs, partion type 0x83
partition num: 3, File System is ext2fs, partion type 0x83
 
Old 12-18-2008, 02:24 PM   #29
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
You mentioned previously that you just got over a respiratory infection, so are you also having problems with your knee? I can relate because I've unfortunately had my share of medical issues recently. Hope your surgery goes OK.

But back to the geeky matters at hand, the geometry commands you ran show that your USB drive is indeed first in the BIOS boot order, i.e. (hd0), and your internal drive is second (hd1). But let me make sure I have this straight: when you boot the computer and don't do anything, you get the Grub error 5? But if you instead press F10/F12 or whichever key takes you to your BIOS boot menu, and if select the USB drive to boot, you can boot into Ubuntu without any problems? Because if that's true, do you see the inconsistency? In both cases the USB drive is being booted, but in the first case you get a Grub error, but in the second case you don't?
 
Old 12-18-2008, 04:20 PM   #30
dickgb
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
At 85 (almosst 86) I have to expect health problems - constantly. But if they can keep patching me up I guess I can't complain. I've been skiing on those knees for 75 years and I hope to keep on going as soon as it its healed. I've been wondering how you find time to help a superannuated pseudo-techie (hobbyist)?

My goal is to eventually switch to linux. I would like to swap linux and Windows, with linux on the internal drive. I want to be able to have the machine boot with or without the USB drive connected so that I can put backups on the extra space on the USB drive and use it as off site storage if I go away. A few years ago we went away for 4 days and when we returned the house had been broken into and the 2nd car, the computer and a lot of other stuff was stolen. I still am trying to piece together some of my old email, photos, etc.

Anyway, as you said, getting back to the 'main event', I definitely see the inconsistency you observe. I was hoping that your diagnostics would pinpoint the problem and show what was causing it. I don't know what Error 5 is but it, apparently, is blocking the booting of linux from the USB drive unless I specifically designate the drive. You have described the problem precisely. It is the Escape key that accesses the Boot Menu and I cannot boot anything without going there to select the drive. I don't know what I have changed but, obviously, it is something. If I select hd1 it boots directly into Windows. If I select hd0, it brings up the menu and it functions normally. Earlier, I disconnected hd0 and it wouldn't boot at all. I haven't tried that recently, however, so I don't know how it will react now.

Where do we go from here??

I hope your health problems aren't serious and that you are back functioning normally.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error - grub cant be written to hd0 PlaneCharlie Linux - Newbie 2 12-02-2007 12:04 AM
Grub hard drive question - root (hd0,0) Thaidog Linux - Newbie 3 12-13-2006 05:18 AM
grub; hda1 == root(hd0,0) ; hda5 = ???? stupidloser Linux - General 6 12-05-2004 01:26 AM
Grub: how to recover Boot Record for (hd0,0)? fishwombat Linux - General 1 04-27-2004 09:43 AM
Grub can't find files on (hd0,0) nathology Linux - Software 6 10-24-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration