LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 05-20-2009, 04:40 AM   #16
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30

PHP Code:
Disk /dev/sda160.0 GB160041885696 bytes
255 heads
63 sectors/track19457 cylinders
Units 
cylinders of 16065 512 8225280 bytes
Disk identifier
0x25c84e89


 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3824    30716248+   7  HPFS/NTFS
/dev/sda2            3825       19457   125572072+   f  W95 Extd (LBA)
/
dev/sda5            3825        6289    19800081    7  HPFS/NTFS
/dev/sda6            6290       11218    39592161    7  HPFS/NTFS
/dev/sda7           11219       13130    15358108+   7  HPFS/NTFS
/dev/sda8           13131       15595    19800081    7  HPFS/NTFS
/dev/sda9           15596       16826     9887976    b  W95 FAT32
/dev/sda10          16827       19457    21133476    7  HPFS/NTFS

Disk 
/dev/sdb163.9 GB163928604672 bytes
255 heads
63 sectors/track19929 cylinders
Units 
cylinders of 16065 512 8225280 bytes
Disk identifier
0x0001e8ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        6079    48829536   83  Linux
/dev/sdb2            6080       12158    48829567+   7  HPFS/NTFS
/dev/sdb3           12159       19929    62420557+   7  HPFS/NTFS 
So, what can I do now ?
 
Old 05-20-2009, 09:41 AM   #17
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,151

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Boot into Ubuntu and run command: sudo grub
This should get you a grub prompt (grub>) where you can type the following commands:

geometry (hd0)
geometry (hd1)

Hit enter after each command to get the output and compare it to the fdisk output you posted earlier to see if the Ubuntu drive sdb is (hd1) or (hd0). Post the info.
 
Old 05-21-2009, 04:31 AM   #18
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
PHP Code:
grubgeometry (hd0)
drive 0x80C/H/19457/255/63The number of sectors 312581808, /dev/sda
   Partition num
0,  Filesystem type unknownpartition type 0x7
   Partition num
4,  Filesystem type unknownpartition type 0x7
   Partition num
5,  Filesystem type unknownpartition type 0x7
   Partition num
6,  Filesystem type unknownpartition type 0x7
   Partition num
7,  Filesystem type unknownpartition type 0x7
   Partition num
8,  Filesystem type is fatpartition type 0xb
   Partition num
9,  Filesystem type unknownpartition type 0x7 

and
PHP Code:
grubgeometry (hd1)
drive 0x81C/H/19929/255/63The number of sectors 320173056, /dev/sdb
   Partition num
0,  Filesystem type is ext2fspartition type 0x83
   Partition num
1,  Filesystem type unknownpartition type 0x7
   Partition num
2,  Filesystem type unknownpartition type 0x7 
What to do next ?

Many thanks !

Last edited by wlaw; 05-21-2009 at 04:32 AM.
 
Old 05-21-2009, 09:28 AM   #19
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,151

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
What do you have in your Ubuntu /boot/grub/menu.lst file? Post it here.
If you are able to boot windows when you have its drive set first in BIOS and Ubuntu when you have the slave set first, you just need an entry for Ubuntu in the boot.ini file as well as the file indicated in the link I posted earlier. You could also put an entry in the /boot/grub/menu.lst file (which should be easier) and keep your slave set to first boot priority so you can boot either Ubuntu or windows from Grub.

If you have the external drive with Ubuntu set to first boot priority, the entry below in /boot/grub/menu.lst should work:

title Windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

The problems come from having the windows drive disconnected during install. An entry for windows should have been created automatically in Ubuntu if you had the drive attached. Try the above entry, no sure it will work but that's the standard for windows on a second drive.
 
Old 05-22-2009, 06:08 AM   #20
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
PHP Code:
cat: /boot/grub/menu.1stNo such file or directory
william
@AMD-AthlonXP:~$ cat /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        2

## 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=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## 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=locale=zh_TW vga=788 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.04.2kernel 2.6.24-24-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-24-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-24-generic
quiet

title        Ubuntu 8.04.2
kernel 2.6.24-24-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-24-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-24-generic

title        Ubuntu 8.04.2
kernel 2.6.24-18-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-18-generic
quiet

title        Ubuntu 8.04.2
kernel 2.6.24-18-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-18-generic

title        Ubuntu 8.04.2
kernel 2.6.24-17-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-17-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-17-generic
quiet

title        Ubuntu 8.04.2
kernel 2.6.24-17-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-17-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-17-generic

title        Ubuntu 8.04.2
memtest86+
root        (hd0,0)
kernel        /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST 
So, what is the next step ?
 
Old 05-22-2009, 09:24 AM   #21
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,151

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Add the code I suggested in my last post to the Ubuntu /boot/grub/menu.lst for xp. You don't have any entry in the menu.lst file for xp. I would also suggested changing the 'timeout' entry from two to a larger number but, that's your choice. If you leave the 'default' entry at zero (0) it will boot Ubuntu unless you make and active selection of xp. Also, this will only work as long as you have the Ubuntu drive set to first boot priority in your BIOS.

Did you ever get the Ubuntu entry in the xp boot.ini file?
 
Old 05-22-2009, 10:56 AM   #22
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
I've added the following lines

PHP Code:
title Windows
rootnoverify 
(hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +
However, there is an error, what can I do now ?
Attached Images
File Type: jpg dscf0335.jpg (251.1 KB, 7 views)
 
Old 05-22-2009, 10:56 AM   #23
james100
Member
 
Registered: Apr 2009
Location: Melbourne Australia
Distribution: Trying out several to see which ones I like
Posts: 43

Rep: Reputation: 16
Moderators: If you have an opportunity to read this post and find that I have made any serious errors, please remove this post. However, I have spent most of my first couple of months using Linux getting my system to multiboot 7 different Linux distros, and at one stage also a Windows XP OS, so I am confident that the essence of this response is correct.

wlaw, as I see it at this stage you have four options. I will list these from easiest to hardest.

Before commencing, given that you disconnected your Windows drive before installing Ubunto, I am assuming that you do not want the Grub bootloader to be installed on your Windows drive.

1. The following should take no more than about 5 minutes. I prefer using GUIs where possible, so I will describe things that way, but you can do everything I say using just the CLI instead if you prefer.

Given the current state of your menu.lst document, define your Ubunto drive as primary master and your Windows drive as primary slave in BIOS. While you are there select your Ubunto drive as the drive that you want to boot from.
Reboot your computer and log into Ubunto. Open up a terminal and issues the following command:
Code:
sudo dolphin
I am assuming that using Ununto your File Manager is Dolphin, if not, you should be able to substitute with the file manager of your choice. You will be then asked for the sudo password, then all sorts of text willflow past your terminal window (if it is anything like mine), Within a few seconds Dolphin will open and yoou will be able to use it as root, so be careful not to make any changes to anything other than as specified, unless you already know how to undo the changes you are making.

Go to your menu.lst file (which should be in /boot/grub), and make a backup copy of the file before you do anything else. After you have a backup, right click on the menu.lst file then select "Open with" from the dropdown menu, and then select using your favourite text editor. I personally prefer gedit.

I like to keep my menu.lst file as clean as possible, so if I were you I would delete all of the text that I have changed to red and green below, expecially the text in red. If you ever find that you need any of this stuff you can recover it from the backup that you just made.
(***Sorry, when I reviewed this response in normal mode I saw that the red and green text I refer to had reverted to its previous colours. In essence the red text was all of the text in orange that had been commented out, as well as the "hiddenmenu" command. The green text was the last five Ubunto entries that show up as blue. Where I mention purple text it is the last four lines of text brfore the line that says "### END DEBIAN AUTOMAGIC KERNELS LIST".***)

I would then change the timeout from 2 to 5. I find that 5 seconds is more than enough time for me to choose what OS I want to use. If you want more time then enter alarger number.

Now, enter the information that yancek suggested in the previous post. If you want Windows to be your default system then this should be placed before the first of the Ubunto commands (which I have shown in blue). If you want to default to Ubunto the place the commands suggested by yancek at the bottom of the menu,lst (where I have placed them and coloured them purple). If you do not amend the line that says
Code:
default 0
then the OS at the top of the list will be your default system, and it will automatically open if you do not make a selection within the time you specified in the timeout field. Depending on the version of windows you are using you can change the text in the first row to show whatever you want, eg
Code:
title Windows Vista
Save the file (as you opened Dolphin as root you should not have any problems doing this). Close Dolphin. Close the terminal. Shut down Ubunto and reboot your computer.
If you deleted the data in green as I suggested then your Grub menu should now show three options when you reboot, Ubunto, Ubunto recovery mode, and Windows.

Finally, as suggested by jschiwal below, check your fstab file (usually found in /etc/fstab) to make sure that it is mounting things correctly. If you have selected Ubunto as your default OS, this willl not be a problem; fstab should already be set up correctly. However, if you have seleced Windows as your default OS, then fstab will probably be showing your Ubunto partition as /dev/sda1 instead of /dev/sdb1. You may want to check this when you have Dolphin opened as root, as you require root priveleges to change fstab.

Quote:
Originally Posted by wlaw View Post
PHP Code:
cat: /boot/grub/menu.1stNo such file or directory
william
@AMD-AthlonXP:~$ cat /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        2
 
## 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=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro
 
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
 
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
 
## 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=locale=zh_TW vga=788 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.04.2kernel 2.6.24-24-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-24-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-24-generic
quiet
 
title        Ubuntu 8.04.2
kernel 2.6.24-24-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-24-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-24-generic
 
title        Ubuntu 8.04.2
kernel 2.6.24-18-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-18-generic
quiet
 
title        Ubuntu 8.04.2
kernel 2.6.24-18-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-18-generic
 
title        Ubuntu 8.04.2
kernel 2.6.24-17-generic
root        
(hd0,0)
kernel        /boot/vmlinuz-2.6.24-17-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro locale=zh_TW vga=788 splash
initrd        
/boot/initrd.img-2.6.24-17-generic
quiet
 
title        Ubuntu 8.04.2
kernel 2.6.24-17-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.24-17-generic root=UUID=85db16ac-efe7-4f2d-b4eb-5cdfb4d6166b ro single
initrd        
/boot/initrd.img-2.6.24-17-generic
 
title        Ubuntu 8.04.2
memtest86+
root        (hd0,0)
kernel        /boot/memtest86+.bin
quiet
 
title Windows 
rootnoverify 
(hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
### END DEBIAN AUTOMAGIC KERNELS LIST 
2. The following will take about 40-50 minutes depending on your system, but most of this time is spent waiting for Ubunto to reinstal.

As has been mentioned before, it would have been better to instal Ubunto with both drives connected. So, as drastic as it sounds, one alternative is to reinstall Ubunto on topof yput existing installation. If you do this with your Windows drive connected as Primary Master and your Ubunto drive installed as primary slave, then you will not have to concern yourself with correcting fstab.

If you take this step, make sure that when you are asked about installing the bootloader (possibly referred to as installing Grub) that you specify that you want it installed in the root directory of sdb (or hdb if the installer is using old terminology). Do not select it to be installed on the MBR of your Windows drive (sba) or it will overwrite your Windows bootloader with the Grub bootloader. Also, when asked, select to have your current Ubunto partition reformatted before intallation, as this will make sure that all vestiges of the original install are removed.

I will refer you to the excellent tutorial previously cited by yancek:
Code:
If you want to boot windows and Linux from the windows bootloader, follow this tutorial:

http://www.linux.com/archive/articles/113945

If you read this tuturial before you commence reinstalling Ubunto, it will clearly show you how to amend the Windows bootloader so that it will allow you to load Windows or Ubunto. The advantage of this method is that if you later want to remove Ununto, it only rakes a minor change ro your Windows bpptloader to restore it to its origibal functionality.

3. The third alternative is to follow the excellent instructions given by John VV in post #8 below. This should only take about five minutes, but I have listed it third because of the risk involved in using dd. A slight error with using it could easily wipe your Windows bootloader, or replace it with the Grub bootloader. Neither of these is disastrous, as you can recover from both of them - but it can be a nuisance.

The only thing that I could think to add to those instructions is:

In order to follow these instructions, you need to have your Windows drive as the Primary Master and your Ubunto drive as the Primary Slave. Thus will enable you to boot from your Windows bootloader, which will give you the option of booting from Windows or Ubunto. However, as this means that Ubunto will be on drive sdb instead of drive sda, you will then need to amend the menu.lst file in your Ubunto /boot/gtub directory so that the root declarations show (hd1,0) instead of (hd0,0). I have corrected this below for the generic Ubunto version call used earlier. Also as previously described you will have to update any fstab references to Ubunto to show /dev/sdb intsead of /dev/sda.
Code:
 
title        Ubuntu 8.04.2, kernel 2.6.24-24-generic
root        (hd1,0)
4. The fourth alternative is to run Ubunto as a virtual machine under Windows. I have listed this last as I have not used this option myself, so I will confine my comments to merely mentioning this as another viable alternative, especially for users with newer systems with at least 1 MByte of RAM.

Last edited by james100; 05-22-2009 at 11:15 AM. Reason: colour formatting error
 
Old 05-22-2009, 02:47 PM   #24
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,151

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Based upon your earlier Grub output you could try:

title windows
rootnoverify (hd0,0)
chainloader +1

Your grub output from the geometry commands shows (hd0,0) as the windows drive so...?
 
Old 05-22-2009, 05:14 PM   #25
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
I believe the Ubuntu drive sdb is (hd1) and windows drive sda is (hd0),

and after changing to what you suggest. I get the following error.
Attached Images
File Type: jpg dscf0336.jpg (255.1 KB, 2 views)

Last edited by wlaw; 05-22-2009 at 05:16 PM.
 
Old 05-22-2009, 06:36 PM   #26
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,151

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
In an earlier post, you said you could boot either windows or Ubuntu by selecting either drive in BIOS. That means the windows boot files are in the first drive, the Ubuntu Grub boot files are in the second drive.

When you ran the fdisk command to get partition information, you had both drives attached and the windows drive was shown as sda, the Ubuntu drive as sdb.

When you ran the geometry commands from grub it showed the windows drivee as (hd0) and the Ubuntu drive as (hd1). This makes sense because sda is equal to (hd0) in Grub, sdb is equal to (hd1) in Grub.

Quote:
I believe the Ubuntu drive sdb is (hd1) and windows drive sda is (hd0),
If you look at your menu.lst file, the entries for Ubuntu show "root (hd0)!! not (hd1)!! When you have both drives connected, you have windows set to first boot priority, you boot Ubuntu by selecting it in the BIOS and run the commands described above in paragraphs 2 and 3 and get the output indicated. Since your windows drive was not connected when you installed Ubuntu, Ubuntu Grub sees itself as the first drive which is why you have root (hd0) in your menu.lst and it boots.

You can continue to boot either system by selecting in the BIOS.
You can change the windows bootloader to boot Ubuntu as suggested above (apparently you tried but were not successful?).
You can install Ubuntu Grub to the master boot record of the first (master) drive with windows on it. This will overwrite your windows mbr.

I think the problems here revolve around having the master (windows) drive disconnected during install and not now having the slave (Ubuntu) drive actually set to first boot priority in the BIOS. You need to make that change permanently in the BIOS not just by selecting with the F12 or some other key during boot. This is the only explanation that makes sense?
 
  


Reply

Tags
boot loader


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command help to mount INITRD.img and add files to it to create bootloader newtovanilla Linux - Newbie 5 07-01-2013 04:23 PM
Windows 2000 Bootloader vs. Mandriva LILO Bootloader Dregnan Mandriva 7 12-03-2007 09:55 PM
Add Mandriva to Suse 9.3 bootloader raysr Suse/Novell 6 05-15-2006 01:15 AM
How can I disable the grub bootloader and enable the lilo bootloader? abefroman Linux - General 1 08-06-2005 08:53 AM
syntax for grub.conf to add win98 to bootloader menu 7689mich Linux - Newbie 3 08-26-2004 12:13 AM


All times are GMT -5. The time now is 07:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration