View previous topic :: View next topic |
Author |
Message |
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
Posted: Fri Apr 29, 2005 8:42 pm Post subject: [Solved] Boot partition |
|
|
Hi all. It's some mounths since I installed gentoo for the first time. Just to make it simpler, I installed it without a boot partition using lilo. Now, I would like to install the boot partition. I'm following the instructions in the gentoo handbook to create the partition and to mount it to /boot. But then? What should I do? I mean, since I didn't install gentoo with the partition mounted, I don't know what to do now. Maybe it is sufficient now to install grub in the usual way (like in the gentoo handbook)?
Thanks.
Last edited by Luc484 on Sat May 07, 2005 10:23 pm; edited 1 time in total |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Apr 29, 2005 8:48 pm Post subject: |
|
|
edit your fstab so that your boot partition will be mounted on /boot. First you'll need to mount it somewhere else just to copy the files that are now on your root partition in the /boot directory to the boot partition. Then you'll have to setup grub again, because it's files have moved and you'll need to edit grub.conf too. Configuring grub is the same as is explained in the handbook. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
Posted: Sat Apr 30, 2005 12:50 pm Post subject: |
|
|
oops...something bad happened . I've tried to boot with grub. The bootloader appears, but then I receive an error:
Block device /dev/hda1 is not a valid root device...
The root block device is unspecified or not detected. Please specify a device to boot.
hda1 is my root partition and hda2 is the boot partition. So, why this error?
I really need a hand 'cause I can't boot (I'm writing from links2 ).
Thanks and hi. |
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Sat Apr 30, 2005 4:37 pm Post subject: |
|
|
Can you post your grub.conf + fstab + output of fdisk -l? _________________
.O.
..O
OOO
|
|
Back to top |
|
|
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
Posted: Sat Apr 30, 2005 4:50 pm Post subject: |
|
|
Yes, sure:
grub.conf:
Code: |
default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.11-r4
root (hd0,1)
kernel /kernel-2.6.11-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda1 udev
initrd /initrd-2.6.11-gentoo-r4
|
fstab (the line commented on /boot is commented only now that I'm running lilo, if I try grub, I de-comment that line):
Code: |
<fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 / ext3 noatime 0 1
#/dev/hda2 /boot ext2 defaults,noatime 1 2
/dev/hdb1 /mnt/ext3b ext3 defaults,noatime 1 2
/dev/hdb2 /mnt/ext3c ext3 defaults,noatime 1 2
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 user,noauto,ro 0 0
/dev/fd0 /mnt/floppy auto user,noauto 0 0
/dev/sda1 /mnt/usbstorage auto user,noauto 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# Swap file
#/swapfile swap swap defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults 0 0
|
output fdisk -l:
Code: |
Disk /dev/hda: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 40640 20482528+ 83 Linux
/dev/hda2 40641 40703 31752 83 Linux
/dev/hda3 40704 41696 500472 82 Linux swap / Solaris
/dev/hda4 41697 158816 59028480 83 Linux
Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 6527 52428096 83 Linux
/dev/hdb2 6528 19457 103860225 83 Linux
|
The second hd is only a data hd. The first one should contain:
hda1: the root partition
hda2: /boot partition
the rest I've not set yet.
The bootable flag now is on hda1 only 'cause I'm booting with lilo. With grub I put the flag on hda2 (boot partition).
Is there something wrong?
Thanks. |
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Sat Apr 30, 2005 5:22 pm Post subject: |
|
|
This doesn't add up. first of all your /boot is commented in your fstab. Change that first.
Then fire up fdisk to toggle a bootable flag to hda2 and clear the flag on hda1.
That should do it i guess. _________________
.O.
..O
OOO
|
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Sat Apr 30, 2005 5:24 pm Post subject: |
|
|
Oops. Didn't see you where using lilo.
You will either have to post your lilo.conf file or have grub do your booting.
I suggest you use grub 'cause i don't know a lot of lilo... _________________
.O.
..O
OOO
|
|
Back to top |
|
|
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
Posted: Sat Apr 30, 2005 6:00 pm Post subject: |
|
|
I don't know, but maybe I wasn't able to wxplain myself.
The situation is this: I've always being using lilo with no problems. Now, I would like to use grub, so I added a partition /boot etc... So, I created the partition, inserted in the fstab, installed grub, configured etc... Tried to boot the pc, but the error appeared. Since I wasn't able to boot with grub, I came back to lilo, so I commented the line of the boot partition in fstab, changed the flag in the partition table etc... Those things I will change when re-trying grub. Otherwise I couldn't boot the pc . Except for the commented line (which I will decomment), and the flag (which I will change), what should I change?
Thanks. |
|
Back to top |
|
|
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
Posted: Sat Apr 30, 2005 11:21 pm Post subject: |
|
|
sigh, nothing to do. Always the same error. I saw that in the italian forum there was a similar error discussed. They said to insert a new feature in the kernel. I inserted it, but nothing to do. If someone has some more informations I would be very grateful.
Thanks and good weekend. |
|
Back to top |
|
|
Luc484 Veteran
Joined: 26 Mar 2005 Posts: 1035 Location: Italy
|
|
Back to top |
|
|
|