Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After installing a new OS, I can't boot. GRUB is not installed on the primary drive and I can't get it to install.
sudo fdisk -l gives this:
Code:
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 127 1020096 83 Linux
/dev/sda2 23948 24321 3004155 5 Extended
/dev/sda3 128 5226 40957717+ 83 Linux
/dev/sda4 5227 23947 150376432+ 83 Linux
/dev/sda5 23948 24321 3004123+ 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda2 1 9729 78148161 5 Extended
/dev/hda5 702 732 248976 82 Linux swap / Solaris
/dev/hda6 733 9729 72268371 83 Linux
/dev/hda7 1 701 5630688 83 Linux
Partition table entries are not in disk order
Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 19193 154167741 83 Linux
/dev/hdb2 19194 24792 44973967+ 5 Extended
/dev/hdb5 19194 24792 44973936 83 Linux
Disk /dev/sdf: 65 MB, 65536000 bytes
5 heads, 32 sectors/track, 800 cylinders
Units = cylinders of 160 * 512 = 81920 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 * 1 800 63983 6 FAT16
Partition 1 has different physical/logical endings:
phys=(1000, 4, 32) logical=(799, 4, 30)
SDA is the SATA HD where I've just installed Kubuntu. HDB is a data disk and HDA is a third HD with an old Linux installation and my backed up home directory from before the reinstall.
I don't know what initrd is but I suppose it should have the same path as the kernel, whether that's with or without the /boot or not I can't figure. /boot is a separate partition on SDA1 by the way. Maybe there should be a boot=/dev/sda somehwere in menus.lst?
Could you repeat the question??.......
Seriously, I'm having some data overload here....a few quick questions/comments;
I think you said that the new Kubuntu is on sda, with /boot mounted to sda1. From your grub config entry, I infer that / is sda3.
Assuming this is right, then this is wrong:
It should read (in part) root (hd0,0) Remember that GRUB counts from zero. This line points to the partition where /boot is mounted.
Second, you do not want the /boot prefix in the kernel path (because you are sending GRUB to the partition which is aleady designated as /boot)
Also inferred here is that you are somehow able to boot into **some** Linux. Therefore GRUB is installed somewhere. But--no matter. To install GRUB on the primary drive (sda, where Kubuntu is), do this:
Code:
grub to start the grub shell
root (hd0,0)
setup (hd0)
Once this is done, then the GRUB config file will need to be in sda1 /boot/grub
There is an old linux install on hda7, which serves no purpose other than to mislead GRUB.
When I go into grub and type find /etc/fstab it gives me results from two disks, hd0,6 and hd2,2.
If I then type root (hd0,6) and cat /etc/fstab it shows the fstab file from the old installation on hda7.
If I type root (hd2,2) and cat /etc/fstab it shows the fstab file from the brand new installation on sda. The same goes for xorg.conf
So, I know hd2,2 is the / partition on sda3.
You gave me a useful hint though. I was trying to install grub by going to root (hd2,2) instead of hd0,0. I tried just now with root (hd2,0) and setup (hd2) and GRUB installed with success.
Getting there. Now, there's still no * next to any of the partitions on the SATA drive when I run sudo fdisk -l, so I'm not sure I can boot to this partition just yet. Is there another command to get it to be bootable?
There is an old linux install on hda7, which serves no purpose other than to mislead GRUB.
When I go into grub and type find /etc/fstab it gives me results from two disks, hd0,6 and hd2,2.
If I then type root (hd0,6) and cat /etc/fstab it shows the fstab file from the old installation on hda7.
If I type root (hd2,2) and cat /etc/fstab it shows the fstab file from the brand new installation on sda. The same goes for xorg.conf
So, I know hd2,2 is the / partition on sda3.
You gave me a useful hint though. I was trying to install grub by going to root (hd2,2) instead of hd0,0. I tried just now with root (hd2,0) and setup (hd2) and GRUB installed with success.
Getting there. Now, there's still no * next to any of the partitions on the SATA drive when I run sudo fdisk -l, so I'm not sure I can boot to this partition just yet. Is there another command to get it to be bootable?
I'm sorry, but this is totally confusing...
What is the primary (#1) drive? (This is set in the bios)
GRUB has to be installed to the mbr of drive #1
This:
Quote:
So, I know hd2,2 is the / partition on sda3.
says that sda is seen by the system as the 3rd drive
Finally, in Linux, partitions do not need to be flagged as bootable.
I'm not sure without checking. When I bought the PC it had only a SATA drive. I installed Linux on it and then added the other two IDE hard drives. I consider the SATA drive to be my primary drive, but perhaps the BIOS sees it as such. If I force the SATA to be primary drive in the BIOS will all the letters change around and the other partitions drives fail to mount unless I change fstab, or are the hdX letters set now by the OS installation and independent of GRUB's naming convention?
Bearing in mind up until a few days ago I was booting into Linux on the SATA drive and haven't changed the physical setup or the BIOS settings since, I don't understand why it shouldn't be possible to do the same now.
Last edited by pickarooney; 12-15-2006 at 01:00 PM.
Just because you were booting into Linux on the SATA does not mean that it was--or is--the primary drive.
All we can say for sure is that the mbr of the primary drive must have boot code in it. That boot code will be tied to some partition which will include its config file. If we have this in place, we can boot into just about anything....
Maybe at this point the question is: How do you WANT your system configured? Do you WANT GRUB on the SATA (as HD#1)
After installing grub to (hd2,0) I rebooted and there was a grub screen. I picked the first option but got an invalid partition error. Back into a LiveCD environment, I ran grub and now the disk numbers had changed and what was previously 2,2 had become 0,2 and the former 0,6 was now 1,6. After editing the menus.lst to reflect the change, using hd0,0 and without the /boot I rebooted into Linux
Everything is as it should be now, all drives and partitions mounted. Thanks very much for the help.
They key was rooting to hd2,0. From there I installed GRUB which apparently attributes its own drive letters and order of preference. As SATA drives have no master/slave config, it's not really possible to set a primary master in the BIOS (at least this is the way I understand it, it's my first time working with this type of HD).
'tis good to be back
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.