View previous topic :: View next topic |
Author |
Message |
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sat Jun 14, 2003 5:54 pm Post subject: Problems emerging grub |
|
|
OK, this is my first attempt at installing Gentoo, but I've successfully managed to get past stage1. However, on stage2 grub gives me an error about not being able to copy to /boot and suggests that I should run:
Quote: | ebuild /user/portage/sys-apps/grub/grub-0.92-rl.ebuild merge
env-update | However, doing this causes the same error (not really surprising). I checked what /boot was mounted to and it's my main NTFS XP partition (which is surprising). Previously, I had a main NTFS XP partition, a secondary NTFS media partition, an ext3 Mandrake partition, a linux swap partition and a boot partition for Lilo. I tried rebooting and running fdisk p again, and it does that that my NTFS partition is my boot partition, so I'm now stumped.
I'm not particularly fluent with Linux, so any pointers would be very helpful ^_^[/quote] |
|
Back to top |
|
|
Edweirdo Guru
Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Sat Jun 14, 2003 7:37 pm Post subject: |
|
|
Blank your drive and start over..
No, but seriously. Having multiple OSes on your one drive can get confusing. Trying to minimize the number of partitions you have may help. For instance, you mention an NTFS partition for media. You may want to make this your "Data" partition. If you can then spare removing Mandrake by putting all the data you want to keep on your NTFS data partition*, you could have only 4 partitions, NTFS XP, NTFS media, gentoo, swap. You could make your /boot directory stay on your gentoo partition since it just makes things easier.
* I found a Windows utility to copy files from ext2/ext3 filesystems at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm _________________ Life is too short and too important to { take seriously | use Windows }. |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sat Jun 14, 2003 8:29 pm Post subject: |
|
|
I had a feeling that may come up as an answer
Yeah, you make a convincing point. I'm at uni at the moment, so I could easily chuck my data onto a flatmates computer, wipe, and start again. In fact, I've even got the time now, having finished exams.
I've got that ext3 reader already, and an ext3 driver for xp, so having a media/data partition for windows in ext3 is OK.
Still, if this can be solved without wiping and reinstalling (more work than I'd like to do) then I'd be grateful. |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 10:24 am Post subject: |
|
|
It's occurred to me that my Mandrake install of Lilo still exists (although I still don't know where on the disc it is). In there any way that I can not emerge grub, then use a tool to configure it to point to gentoo? Actually, seeing as they're both installed in the same partition would it just be enough to boot to that partition without reconfiguring Lilo? |
|
Back to top |
|
|
Edweirdo Guru
Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Sun Jun 15, 2003 11:06 am Post subject: |
|
|
lilo is installed in the Master Boot Record (MBR) which is actually a part of the disk not represented by any partitions. This basically tells the BIOS where to find the operating system. LILO replaces the Windows boot loader and can refer to any OS on your disk (or other disks). It is possible to modify your lilo.conf to include the partition gentoo is on and choose between windows, mandrake or gentoo when booting. Maybe you should post a listing of your "fdisk -l /dev/hda" output and also your lilo.conf. _________________ Life is too short and too important to { take seriously | use Windows }. |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 12:20 pm Post subject: |
|
|
Thanks for the help, I appreciate it
fdisk -l /dev/hda:
Code: | Device Boot Start End Blocks Id System
/dev/hda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/hda2 1913 9728 62782020 f Win95 Ext'd (LBA)
/dev/hda5 1913 3154 997633+ 83 Linux
/dev/hda6 3188 9728 52546551 7 HPFS/NTFS
/dev/hda7 3155 3187 265041 82 Linux Swap |
This seems weird - hda2 seems to contain hda5,6, and 7 when you look at the start/end blocks. Is this right?
lilo.conf is harder, because I destroyed that when I rebuilt the file system for gentoo earlier in the install. Having said that, I only made one change to it from the Mandrake 9.1 default - appended 'noapic' to get Ethernet and USB running on my box (Shuttle SS51G, SiS 651 chipset). |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 8:35 pm Post subject: |
|
|
I've been reading through the Portage manual and it seems that anything in 'system' is compulsory for gentoo - I assume this includes grub. Is there any way around this?
It seems to me that seeing as I know how to configure Lilo - and as I've got an already working Lilo installation - it'd be better to just keep that.
Or maybe I'm totally on the wrong track? ^_~
The only easy way of backing up stuff I've got is to borrow some space on a friends box. I'm not going to bother him until his exams finish on Weds, so I'm going to carry on plugging away at getting this working until then, at which point I'll probably give up and reformat the drive. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Sun Jun 15, 2003 8:44 pm Post subject: |
|
|
It is OK to emerge both LILO and GRUB.
Only the one you have setup and installed on the harddrive will be used for booting. |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 9:01 pm Post subject: |
|
|
OK, but when running an 'emerge system' it automagically tries to download grub-0.92 and install it to /boot. Can I just tell it not to bother with grub? |
|
Back to top |
|
|
Edweirdo Guru
Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Sun Jun 15, 2003 9:45 pm Post subject: |
|
|
Partitions 101. You can only have 4 partitions on a drive. I don't know where that limitation comes from, but I'm sure Bill Gates wouldn't mind if we blame him. To get around this you can create something called an "extended partition". This is a partition that actually contains 4 "virtual" partitions. That is why it looks like hda2 contains hda5,6 and 7, because it does. So, by looking at your list you have 1 real partition, and an extended partition that contains 3 other partitions. It looks like your linux partition is only 10 GIG and therefore you don't have a "boot" partition, only a root partition. I think your lilo.conf might look like this:
Code: |
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=200
lba32
default=GentooLinux
image=/boot/vmlinuz-2.4.20-gentoo-r5
label=GentooLinux
read-only
root=/dev/hda5
other=/dev/hda1
label=WindowsXP
|
And just to be thorough, your fstab might look like this:
Code: |
/dev/hda5 / ext3 noatime 1 1
/dev/hda6 /mnt/data ntfs noatime 0 0
/dev/hda7 none swap sw 0 0
etc...
|
Hope this helps. _________________ Life is too short and too important to { take seriously | use Windows }. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Sun Jun 15, 2003 10:00 pm Post subject: |
|
|
GRUB shouldn't complain as long as your /boot directory is writeable.
See if this gives you any errors :
Code: | # touch /boot/testfile |
|
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 10:14 pm Post subject: |
|
|
Ed: excellent explanation, thanks a lot
Cyrillic: nope, gentoo is mounting /boot to the root of my NTFS partition which obviously isn't writeable under the current Linux NTFS drivers, so it stops the 'emerge system' with an error.
So, what should I mount boot to in the abscence of a dedicated boot partition? Hmm. Sorry for all the hassle, I really do appreciate this ^_^
Last edited by Robin_reala on Sun Jun 15, 2003 10:15 pm; edited 1 time in total |
|
Back to top |
|
|
Edweirdo Guru
Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Sun Jun 15, 2003 10:15 pm Post subject: |
|
|
P.S. When booting off the livecd you should only mount /dev/hda5 as /mnt/gentoo, do not try to mount a boot partition because you don't have one. _________________ Life is too short and too important to { take seriously | use Windows }. |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Sun Jun 15, 2003 10:22 pm Post subject: |
|
|
*confused*
OK, here's my thoughts:
1) grub needs to install to /boot during an 'emerge system'
2) /boot is currently automatically mounted to hda1 (my NTFS partition) and therefore can't write (luckily)
Which leaves two questions:
1) Where to I need to mount /boot to to get grub to install?
2) Do I even need to mount /boot? Ed, you seem to think not? |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Sun Jun 15, 2003 11:37 pm Post subject: |
|
|
Hopefully I can help to clear the confusion.
The "boot" flag (or * as seen in fdisk) is only of interest to the Windows bootloader and will be ignored by LILO, GRUB, and the Linux kernel.
/boot is a directory on your / (root) partition.
A boot partition is a small linux partition that holds your kernel(s) and a few other things. This partition must be manually mounted in order to use it.
Having a separate boot partition is optional, and if you don't have one, the /boot directory is used instead.
ps. Don't mount any of your Windows partitions during the installation because it will cause problems (as you have already noticed) |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Mon Jun 16, 2003 11:06 am Post subject: |
|
|
OK, so what do I need to mount during install?
1) Mount swap using 'swapon /dev/hda7'
1) /dev/hda5 to /mnt/gentoo using 'mount /dev/hda5 /mnt/gentoo'
And I don't need to worry amount mounting a seperate partition to /mnt/gentoo/boot.
OK, that sounds easy enough I'll have a go at it after breakfast, then try from the beginning of stage 2 again.
Thanks guys! |
|
Back to top |
|
|
Robin_reala n00b
Joined: 14 Jun 2003 Posts: 25
|
Posted: Mon Jun 16, 2003 2:15 pm Post subject: |
|
|
Oh. I feel like such an idiot Earlier in the install document (section 7.2) they'd given the example of mounting /boot from /dev/hda1. Yeah. I just typed it in without realising what I was doing.
Oh well. At least it's installed now. Now to reboot and try loading it |
|
Back to top |
|
|
|