View previous topic :: View next topic |
Author |
Message |
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 7:51 pm Post subject: Can't write grub.conf + dual boot questions |
|
|
Hi,
I'm at the point in the installatoin where I"ve emerged grub but not yet installed it. I'm trying to get grub.conf sorted out but I have a couple of issues. I think that I had the gentoo stuff sorted out but I was a bit confused at the end with the dual boot stuff and specifically wihch partition rootnoverify should specify. I had inteded to save what I had and include it in the post but that brings me to the second issue which is that I was unable to save the file because apparently the filesystem was mounted read only. It's not clear to me why though.
Here is my partition table:
Code: |
sysresccd / # fdisk /dev/sda
Welcome to fdisk (util-linux 2.21.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
Command (m for help): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xd45a1e8d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 3074047 1536000 7 HPFS/NTFS/exFAT
/dev/sda2 3074048 318081023 157503488 7 HPFS/NTFS/exFAT
/dev/sda3 948099072 976771071 14336000 7 HPFS/NTFS/exFAT
/dev/sda4 318081024 948099071 315009024 5 Extended
/dev/sda5 318083072 318148607 32768 83 Linux
/dev/sda6 318150656 334927871 8388608 82 Linux swap / Solaris
/dev/sda7 334929920 641114111 153092096 83 Linux
Partition table entries are not in disk order
Command (m for help):
|
where /dev/sda5 is the boot partition I crteated for gentoo and /dev/sda7 is the /root. The windows stuff should be obvious.
Here is /etc/fstab:
Code: |
sysresccd / # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda5 /boot ext2 noauto,noatime 1 2
/dev/sda7 / ext3 noatime 0 1
/dev/sda6 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
sysresccd / #
|
Help!
Thanks in advance.
-ts1971 |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 20, 2012 8:16 pm Post subject: |
|
|
"apparently the filesystem was mounted read only" probably means that you were trying to run the command from outside the chroot as suggested by the command prompt in your post. It happens a lot.
boot cd
Quote: | mount /dev/sda7 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls /boot | got kernel (initramfs system-map if applicable)? Code: | nano /boot/grub/grub.conf | write them and save them. _________________ Defund the FCC. |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 8:24 pm Post subject: |
|
|
DONAHUE wrote: | "apparently the filesystem was mounted read only" probably means that you were trying to run the command from outside the chroot as suggested by the command prompt in your post. It happens a lot.
boot cd
Quote: | mount /dev/sda7 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls /boot | got kernel (initramfs system-map if applicable)? Code: | nano /boot/grub/grub.conf | write them and save them. |
LOL. This has been an ordeal. I've been at it off and on for a week and a half. In any event, I assume that I was supposed to issue the commands you've listed above from a non chrooted environment. Here's what happened:
Code: |
sysrescd init.d # mount /dev/sda7 /mnt/gentoo
mount: mount point /mnt/gentoo does not exist
|
Should I have chrooted first? If so, why would you have me chrooting afterwards. Ugh.
Thanks as always for the help.
-ts1971 |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 8:25 pm Post subject: |
|
|
DONAHUE wrote: | "apparently the filesystem was mounted read only" probably means that you were trying to run the command from outside the chroot as suggested by the command prompt in your post. It happens a lot.
boot cd
Quote: | mount /dev/sda7 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls /boot | got kernel (initramfs system-map if applicable)? Code: | nano /boot/grub/grub.conf | write them and save them. |
LOL. This has been an ordeal. I've been at it off and on for a week and a half. In any event, I assume that I was supposed to issue the commands you've listed above from a non chrooted environment. Here's what happened:
Code: |
sysrescd init.d # mount /dev/sda7 /mnt/gentoo
mount: mount point /mnt/gentoo does not exist
|
Should I have chrooted first? If so, why would you have me chrooting afterwards. Ugh.
Thanks as always for the help.
-ts1971 |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 20, 2012 8:31 pm Post subject: |
|
|
I haven't booted every nor the latest sysresccd. they used to have /mnt/gentoo built in.
boot cd, then as before suggested Quote: | mount /dev/sda7 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls /boot | got kernel (initramfs system-map if applicable)? Code: | nano /boot/grub/grub.conf | write them and save them. _________________ Defund the FCC. |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 8:48 pm Post subject: |
|
|
DONAHUE wrote: | I haven't booted every nor the latest sysresccd. they used to have /mnt/gentoo built in.
boot cd, then as before suggested Quote: | mount /dev/sda7 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/boot
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls /boot | got kernel (initramfs system-map if applicable)? Code: | nano /boot/grub/grub.conf | write them and save them. |
Code: |
sysresccd init.d # mkdir /mnt/gentoo
sysresccd init.d # mount /dev/sda7 /mnt/gentoo
sysresccd init.d # mount /dev/sda5 /mnt/gentoo/boot
mount: /dev/sda5 already mounted or /mnt/gentoo/boot busy
mount: according to mtab, /dev/sda5 is mounted on /boot
|
Should I just skip that line and continue? I apologize for asking for all the hand holding, but frankly at this point I'm completely confused.
-ts1971 |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 20, 2012 8:53 pm Post subject: |
|
|
a little strange
clean up with a reboot of the cd and a do over. _________________ Defund the FCC. |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Sat Oct 20, 2012 9:12 pm Post subject: |
|
|
ts1971,
If you encounter that "already mounted" problem again check the output of mount - maybe it is getting mounted _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
Jickler n00b
Joined: 09 Sep 2011 Posts: 72
|
Posted: Sat Oct 20, 2012 9:17 pm Post subject: |
|
|
Make sure you're running Code: | mount /dev/sda5 /mnt/gentoo/boot | not Code: | mount /dev/sda5 /boot |
|
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 9:26 pm Post subject: |
|
|
DONAHUE wrote: | a little strange
clean up with a reboot of the cd and a do over. |
Okay, whatever the weirdness was, the reboot solved it. fstab was as already edited. I'm including it here just to make sure the it looks okay.
Code: |
(chroot) sysresccd / # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda5 /boot ext2 noauto,noatime 1 2
/dev/sda7 / ext3 noatime 0 1
/dev/sda6 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
(chroot) sysresccd / #
|
I've also edited grub.conf but it's still unclear to me which partition I should specify to rootnoverify. Here is the file as it stands now:
Code: |
(chroot) sysresccd / # cat /boot/grub/grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.
default 0
timeout 30
splashimage=(hd0,4)/grub/splash.xpm.gz
title Gentoo Linux 3.4.9
root (hd0,4)
kernel /boot/kernel-genkernel-x86_64-3.4.9-gentoo root=/dev/ram0 real_root=/dev/sda7 video=uvesafb:mtrr:3,ywrap,1024x768-32@85
initrd /boot/initramfs-genkernel-x86_64-3.4.9-gentoo
# vim:ft=conf:
title Windows Something or Other
rootnoverify (hd0,?)
makeactive
chainloader + 1
(chroot) sysresccd / #
|
So, two questions. Does everything other than the rootnoverify look correct? And given my partition table which is posted upthread, what should I be specifying for the rootnoverify line?
Thanks!
-ts1971 |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Sat Oct 20, 2012 9:30 pm Post subject: |
|
|
ts1971
rootnoverify (hd0,0) should boot your windows _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 9:34 pm Post subject: |
|
|
BillWho wrote: | ts1971
rootnoverify (hd0,0) should boot your windows |
Thanks Bill.
-ts1971 |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 10:10 pm Post subject: |
|
|
Okay so after installing grub on the MBR and rebooting gentoo is looking good. Windows ... not so much. Here's the error when I choose windows from the bootloader screen:
Code: |
Booting 'Windows Something or Other'
rootnoverify (hd0,0)
makeactive
chainloader + 1
Error 1: Filename must be either an absolute pathname or blocklist
Press any key to continue...
|
It must be something wrong with my grub.conf, no?
Thanks.
-ts1971 |
|
Back to top |
|
|
Jickler n00b
Joined: 09 Sep 2011 Posts: 72
|
Posted: Sat Oct 20, 2012 10:30 pm Post subject: |
|
|
I don't know too much about GRUB and its syntax, this probably isn't your problem and I'm sure someone will come along with the answer, but...
I notice in all the grub examples I see the line is
not what you posted, which was:
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 20, 2012 10:33 pm Post subject: |
|
|
good eye jickler _________________ Defund the FCC. |
|
Back to top |
|
|
ts1971 n00b
Joined: 06 Oct 2012 Posts: 52
|
Posted: Sat Oct 20, 2012 11:04 pm Post subject: |
|
|
Jickler wrote: | I don't know too much about GRUB and its syntax, this probably isn't your problem and I'm sure someone will come along with the answer, but...
I notice in all the grub examples I see the line is
not what you posted, which was:
|
That was it. Thanks a lot Jickler.
-ts1971 |
|
Back to top |
|
|
|