LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2005, 11:20 AM   #16
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15

I have installed Ubuntu but all is not well. I used the 2.6.12-9-386 Kernel - unaware of which to choose it anything 386 seemed to make sense.
Ubuntu is installed on the 40gb drive together with a 1gb swap partition and a pre-existing fat partition.
Booting off hdd3 gives us a no boot disk error.
Booting off hdd2 boots win
Booting off hdd1 gives us grub prompt.

In grub prompt:
[hd1 is the 200gb drive aka hda1 and it seems when grub is run from FD hd0]
setting root hd0,1 returns error 18 - selected cylinder exceeds max supported by BIOS. This I believe to be the swap partition
hd0,2 sets the ubuntu installation. Calling kernel vmlinuz-2.6.12-9.386 also returns error 18.

fdisk -l

Device Boot Start End Blocks Id System
/dev/hda1 * 1 26203 198094648+ 83 Linux

Disk /dev/hdb: 40.8 GB, 40822161408 bytes
255 heads, 63 sectors/track, 4963 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdb2 4842 4963 979965 82 Linux swap / Solaris
/dev/hdb3 2551 4841 18402457+ 83 Linux

Partition table entries are not in disk order

Disk /dev/hdc: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdc2 2551 9964 59552955 7 HPFS/NTFS


ubuntu_drive/boot/grub/menu.lst contents:

title Ubuntu, kernel 2.6.12-9-386
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hdb3 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
savedefault
boot

title Ubuntu, kernel 2.6.12-9-386 (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hdb3 ro single
initrd /boot/initrd.img-2.6.12-9-386
boot

title Ubuntu, memtest86+
root (hd1,2)
kernel /boot/memtest86+.bin
boot

title Other operating systems:
root


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


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda1.
title Fedora Core (2.6.11-1.27_FC3) (on /dev/hda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.27_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.27_FC3.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda1.
title Fedora Core (2.6.11-1.14_FC3) (on /dev/hda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.14_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.14_FC3.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda1.
title Fedora Core (2.6.10-1.770_FC3) (on /dev/hda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-1.770_FC3.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda1.
title Fedora Core (2.6.9-1.667) (on /dev/hda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
savedefault
boot

ubuntu_drive/etc/fstab

/dev/mapper/casper-snapshot / auto noatime 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/hdb2 swap swap defaults 0 0

BTW the ubuntu installer is not good for your heart when there is data at risk. Anaconda/Disk druid for me any day, compared.
thanx
 
Old 11-10-2005, 12:34 PM   #17
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
If you get a Grub prompt then you are half way there.

The way you described booting up the disks makes me think that you are using the BIOS to alter the booting order of the disks. That must be stopped because Grub calls the first disk handed over by the BIOS as (hd0) so it could be hda, hdb or hdc in your 3 cases. Grub can never boot up your systems that way. You must freeze the BIOS booting order. From now on stick with hda as the 1st bootable disk.

If you get a Grub prompt from booting the MBR of hda then use it as follow

You should be able manually boot every system using the Ubuntu /boot/grub/menu.lst by dropping off the "title" line. For example your Ubuntu should be bootable with the following lines in Grub prompt

root (hd1,2)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hdb3 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
boot

The above instructions tell Grub that the root of Ubuntu is (hd1,2) or the 3rd partition of the 2nd disk which should correspond to hdb3. Remember Grub counts from 0!

Your previous statement of

setting root hd0,1 returns error 18 - selected cylinder exceeds max supported by BIOS. This I believe to be the swap partition

effectively asked Grub to treat /dev/hda2 as the root but my friend you have nothing more than hda1 in the first disk! So Grub did complain correctly.

also your statement of

hd0,2 sets the ubuntu installation. Calling kernel vmlinuz-2.6.12-9.386 also returns error 18.

did not point to Ubuntu. Its root is in (hd1,2), exactly corresponds to hdb3

You may also try to boot your Windows in hdb1 with the following statement in Grub prompt

root (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
I would suggest to you to concentrate using the Grub prompt to boot Ubuntu and Windows. You then learn to boot 2 systems manually. It appears to me that you may have played around Ubuntu's /boot/grub/menu.lst resulting it unusable. If Grub can't load menu.lst it always drops into a Grub prompt which can be a blessing for you.

So you can let loose yourself and go for it !
 
Old 11-10-2005, 01:28 PM   #18
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Cheers.
I have never edited the menu.lst - that was generated by Ubuntu/Grub during installation.
I based my judgement on the partitions by testing each partition's content. If hd0,0 is fat, hd0,1 a swap partition and hd0,2 ext I assumed hd0 to be the 40gb drive..

Ill now boot back off hdd1 [and leave the BIOS untouched] and try out your tips.
thanx

EDIT:
with hdd1 set as the first boot device
grub> root (hd1,2)
No such partition
When grub is run off the floppy disk [cd & hdd1 are the successive boot devices]
grub> root (hd1,2)
ext2...
and kernel returns error 18

When only hdd1 is set and as the first boot device I am certain that the 40gb drive containing ubuntu is referenced as hd0, 200gb fc drive is hd1 and the 80gb hd2.
I take it that the drive set as root is the drive containing the os to be booted ie (hd0,2)/boot/vmlinuz...

Last edited by TotalLinuxNoob; 11-10-2005 at 03:44 PM.
 
Old 11-10-2005, 05:20 PM   #19
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Well the way you swap the disks order with the BIOS could introduce unwarranted complications. There is one way to check and that is /boot/grub/device.map in both ubnutu and your FC.

Ubuntu construct menu.lst based on the hard disk assembled at the time of the installation and its root partition is recorded as (hd1,2)

so list the content of Ubuntu's /boot/grub/device.map here.

You should start to use Grub's notation is describing the disks, i.e. (hd0)=first disk etc

You can do quite a bit of investigation in Grub prompt

gemetry (hd0) will list out the partitions in the first disk. You can try it with (hd1) and (hd2) too. There is no argument about it as this is exactly what Grub got from the BIOS.

It would appear to me that you haven't set the 200Gb as the first bootable disk and so Grub coundn't find the the correct partitions. Alternatively you have not been able to replicate the booting order at the time you installed Ubuntu.
 
Old 11-10-2005, 06:12 PM   #20
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
device.map contents:

(hd0) /dev/hda
(hd1) /dev/hdb
(hd2) /dev/hdc

Currently when booting up grub hdd1 [BIOS name] is the only device in the boot order.
When Ubuntu's installation completed and the machine rebooted Xp was loaded...
Maybe disconnecting the other hd's and installing grub on the 40gb drive[hdb] would solve the prob? Then setting the boot order in the bios to boot hdd3[hdb] first once the other drives are connected again...?
 
Old 11-10-2005, 06:36 PM   #21
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
It is a bad idea to pull out the disk infront of /dev/hdc because it will make /dev/hdc inherit the (hd0) status. If you manage to make it work the re-connection of the the original /dev/hda will render the later disk utterly useless.

Why don't you investigate it one step at a time.

In Grub prompt, you can type

geometry (hd1)

To see all the partitions there. If the partitions agree with those you put onto the thread then the command

root (hd1,2)

should get a Grub response that the partition is Type 83 and not "No such parttition"


Lastly your BIOS name hdd1 may be the hdc if you can choose hdd0 there! Can you confirm this?
 
Old 11-10-2005, 07:08 PM   #22
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Staying true to my forum handle, I only just realized the BIOS hd array base also starts at zero. Drives are listed hdd0, SCSI, ....,hdd1,etc hence never spotting drive 0..
Does the grub order always match the list order of the BIOS? i.e. hdd0 in the BIOS matches hd0 in grub?

When hdd0 is set as the first boot device grub is loaded and prints error 18, then stalls.

Here is the information obtained using geometry

hd0
partition 0, type fat, 0xC
partition 1, error 18
partition 2, ext2fs, 0x83

hd1
partition 0, ext2fs, 0x83

hd2
partition 0, fat , 0xc
partition 1, uknown, 0x7 [NTFS]

Last edited by TotalLinuxNoob; 11-10-2005 at 07:53 PM.
 
Old 11-10-2005, 07:39 PM   #23
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I have said it before that Grub works on the disks order handed down by the BIOS. I can't be sure every BIOS starts with 0 but it is well documented that Grub counts from 0.

The geometry statement show up (hd0,1) having a problem. It should have cooresponded to your /dev/hdb2 reprted by Post #16 as Type 82 (for Swap). Now it is error 18!

Another inconsistency is the 2 hdc partitions previously reported as one has Type c (for fat32) and the other Type 7 (for NTFS)

In that case you can ask Grub to rectify (hd0,1) by typing at Grub prompt

parttype (hd0,1) 0x82

I suggest to leave hdc alone at this stage and go ahead to boot the system up if error 18 has been removed.

You can get the full compliment of Grub commands by typing "help" at Grub prompt.

To be honest I don't know where you are now as conflicting information are coming out continuously.

The right thing you should do now is to try the BIOS setting again to get the disks order matching the condition when you installed Ubuntu, i.e. have (hd0) with only 1 partition, (hd1) with 3 and (hd2) with 2 partitions.

Try to follow Post #17 again to see if you can boot up the two systems.
 
Old 11-11-2005, 08:00 AM   #24
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Slight error in the documenting of the geometry reports. the NTSF drive is there. Post is updated. That is the structure when the bios is set to only boot HDD1 and thus the grub console appears.
Tried to change the partition but it remained of type 0x83
Rearranging to the original boot order will boot xp - atleast this is what happened when ubuntu was installed and restarted the machine.
setting hd0,2 as the root works but assigning anything like
kernel /boot/
returns error 18
this also happens when the full kernel path is set and when root=... ro quiet splash is added.
How about I leave the boot order the way it is [only booting hdd1 [set in bios]] and trying to reinstall ubuntu again after deleting the 2 partitions recently created for ubuntu [swap and ext2]?
 
Old 11-11-2005, 08:23 AM   #25
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
AT this juncture your best way forward is to stick with the booting order that get you XP.

Re-install Ubuntu again but do not intervene except in specifying the / partition. Do not mess around the root in menu.lst just let Ubuntu do everything. Make sure it place Grub in the MBR (if it offers to put Grub in a floppy opt for it instead of the MBR).

Complete the installation and check that you can boot to both systems. Thereafter don't touch the BIOS again unless someone points a gun at your head to order you to.
 
Old 11-11-2005, 09:04 AM   #26
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Ok. The way to get xp up is specifying hdd2 as the boot device in the BIOS.

Re-install Ubuntu again but do not intervene except
Is deleting the two partitions first ok tho and recreating the partitions with the installer?
The installer was a bit funny. I created the / and swap partition but it never asked me whether I wanted to use those.. I guess it just assumed.. [I say this because there was is the 200gb ext2 drive]. Thats all I configured during the installation - menu.lst was never modified.

check that you can boot
I suppose you mean just let the installation complete and let it reboot and see what happens?

Of course to install Ill have to set the first device to boot to my optical drive and the second device to hdd2 [BIOS notation. boots xp]

Just noticed the fat partition on the hdb drive isn't listed in win since installing ubuntu. Ill boot up ubuntu live to see what happened to it.

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

I feel like a win user. I can't wait to get rid of that piece of junk tho...

Last edited by TotalLinuxNoob; 11-11-2005 at 09:18 AM.
 
Old 11-11-2005, 09:26 AM   #27
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Is deleting the two partitions first ok tho and recreating the partitions with the installer?

You don't have to delete them. You can ask the installer "to format" them for use as / and swap partition.

I suppose you mean just let the installation complete and let it reboot and see what happens?

It is essential that every time after you install a new system you do a check on the existing bootable partitions to see if they haven't been accidentally damaged or erased.

I understand that you have to select CD as the first bootable device. That is OK. It is the first bootable hard drive that you want to control.

If you manage a successfuly installation then why not print out the /boot/grub/device.map and have it tattooed in the body to remind you how the disks were connected and named under Linux. I bet it minimizes the confusion.

Last edited by saikee; 11-11-2005 at 09:30 AM.
 
Old 11-11-2005, 01:32 PM   #28
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Installed Ubuntu on hdb [the 40gb drive]

At the time the boot order was:
CD
HDD1

Installed Grub to the MBR. It reported:
grub-install (hd0)

Once the installation was finalized and ready to reboot the disk was removed, the system rebooted and Win Xp loaded - not the pleasant sight of a Grub menu.

Suppose I better load up menu.lst of the new installation?
 
Old 11-11-2005, 05:01 PM   #29
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
OK I think you should freeze everything as you now have a workable XP, a complete Ubnutu installation that doesn't boot but with the correect addresses of the partitions.

I am answering a few other threads and trying to be lazy. So can I ask you to read #10 of this thread.

The reason is you can learn to replicate Ubuntu's Grub into its root partition so that it can be chainloadable

You learn to make a Grub floppy unattached to a system

You can then manually boot up your Ubuntu and XP by trial and error.

In using the Grub floppy (unattached to a system) you can ask Grub to tell you the partition layout of every disk, using statement like

geometry (hd0)
geometry Ihd1)
etc (type help to get to know what other commands availabe from Grub)

The partition information is from the mouth of the horse so it has to be good.

You use the above mentioned thread to adjust the partition number to suit you own circumstance.

Raise a question if you got stuck. Many posters have walked away with a happy result so should you.

Last edited by saikee; 11-11-2005 at 05:04 PM.
 
Old 11-11-2005, 06:01 PM   #30
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Preliminary question: like in the aforementioned thread, will I need need to install grub in a partition or am I OK b/c Ubuntu installed it on hd0?
Ill go create that boot floppy now.
Btw what is it that chainloader does?

Thanx. Hope is appearing again.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where's my 'Kernel-output-path' BuckRogers01 Debian 2 07-14-2005 08:13 AM
Finding the kernel path blacksunshine Linux - Software 2 10-03-2004 02:45 PM
What is the path to Linux Kernel source beginner16 Linux - Newbie 4 11-24-2003 04:21 AM
Compiling Kernel (specifying Bash path) ugenn Linux - Software 5 04-02-2003 12:38 PM
path and filename of compressed kernel ? ohernandez Linux - General 3 05-29-2002 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:05 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