View Full Version : grub.conf anf fstab in f9
Anniedog
19th April 2008, 04:06 PM
I am in the process of adding hard drive transfering data and reading system for f9 preview. Can anyone confirm that to mount a drive partition that is not on the operating system drive instead of LABEL=????. I need to give the full path /dev/sdb2. I have tried LABEL and fouled up . I had to boot into my FC6 to edit out the f8 FSTAB LABEL entries (because I never learnt vi). I wish to have the partitions monuted up under / directories eg /photo /film /music etc. so that I can fix samba shares on the network. It may be that I do not need fstab entries and automount under /media may be enough for samba shares so advice here welcome. I have everything booting fine xp/fc6 shown sdc, f8 sda and new drive sdb using the f8.
Anniedog
19th April 2008, 05:27 PM
Right well i altered /etc/fstab and have successfully mounted the new hard drive partitions to the / directory. I also have the duplcate automounted partitions and partitions from other drives showing in /media. but so far so go. My only concern was that I had noticed that drives under /media directory seemed to unmount themselves at times and this would be no good for the network. I shall set up the shares next in samba. below for reference is the mess I have in fstab whilst i am transferring over.
LABEL=/ / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
LABEL=/music /music ext3 defaults 1 2
LABEL=/photo /photo ext3 defaults 1 2
LABEL=/video /video ext3 defaults 1 2
LABEL=/martins /martins ext3 defaults 1 2
/dev/sdb1 /musicphoto ext3 defaults 1 2
/dev/sdb2 /filmvideo ext3 defaults 1 2
/dev/sdb3 /data ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda6 swap
Bold lines are those I have added
fstab would not take for example. I had used e2label to give each partition a label.
LABEL=filmvideo /filmvideo ext3 defaults 1 2
Anniedog
20th April 2008, 10:28 AM
I have xp fc6 and f8 installed. Does anyone know if it is ok to use e2label to give new labels to the / and /boot partitions? I have read that locations are relative to the /boot partition. I would expect that fstab would need to be edited but do not know if other files would need to be changed.I just cant find a reference to doing this.Note that I have 2 /boot partitions in place /boot (fc6)and /boot1 (f8) each on a seperate drive, so suspect relabelling is possible.
What I would like is to have my FC6 / named /fc6 and fc6 /boot named /fc6boot. I am getting ready to try f9 and its getting crowded in computer.
Any idea anyone?
Seve
20th April 2008, 10:34 AM
Hello:
Yes, it is possible to relabel your installation.
You need to relabel your relevant partitions and also have those changes reflected in your/etc/fstab file.
Seve
Anniedog
20th April 2008, 10:40 AM
cheers seve , just couldnt seem to find ref anywhere . many thanks.
Anniedog
20th April 2008, 11:54 AM
Well seve you are partly right. It is ok to relabel the / and /boot partitions. Then the /media mount points will show up under the new labels. That is ok when only booting into one fedora (f8). If you try to then boot into the relabeled fedora(fc6) it just kicks up errors and stops. Fails to find anything. So it looks like e2label is fine if you only want to actually boot into one release and access normal partitions. Otherwise it is editing each time to boot back into another fedora. I suppose it would be possible to make and run a script that could make this possible one for each fedora. Though it would get interesting if you added extra drives.
EDIT
Please note from my playing if you decided to relabel both /boots and / partitions for each . In my case fc6 and f8 at the same time you could make it impossible to access either on restart. So be very careful here. Otherwise it would be rescue disk time in a big way.
bingoUV
20th April 2008, 12:38 PM
well if you edit your grub.conf to reflect the new labels , there would not be any problem in relabeling and then booting many numbers of fedoras. So, if you relabel
1. Edit fstab
2. Edit grub.conf
3. reboot
Always keep a live cd (knoppix / fedora live CD etc.) which helps if you screw up. Rescue mode might be daunting for inexperienced users, and unpleasant for most people.
Anniedog
20th April 2008, 12:49 PM
bingoUV I did exactly what you said but without the grub.conf
What exactlty I am changing there I cannot see anything that refers to a label?
leigh123linux
20th April 2008, 12:58 PM
bingoUV I did exactly what you said but without the grub.conf
What exactlty I am changing there I cannot see anything that refers to a label?
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,1)
# kernel /boot/vmlinuz-version ro root=/dev/sdb2
# initrd /boot/initrd-version.img
#boot=/dev/sdb2
default=0
timeout=5
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.25-3.fc9.x86_64)
root (hd1,1)
kernel /boot/vmlinuz-2.6.25-3.fc9.x86_64 ro root=LABEL=/1234 rhgb quiet
initrd /boot/initrd-2.6.25-3.fc9.x86_64.img
title Fedora (2.6.25-1.fc9.x86_64)
root (hd1,1)
kernel /boot/vmlinuz-2.6.25-1.fc9.x86_64 ro root=LABEL=/1234 rhgb quiet
initrd /boot/initrd-2.6.25-1.fc9.x86_64.img
[root@localhost ~]#
Anniedog
20th April 2008, 12:58 PM
Woops what a plank I am see it now. Many thanks for the extra bit of info bingoUV. Yes I always have a live cd to hand. Just thought I would mention that bit.
Edit
thankyou leigh I was reading my grub.conf when it jumped out and hit me between the keys. i cannot believe that I missed it. I have spent alot of time playing with grub.conf I should have realised. Your post was there when I posted thisone. Thank alot.
lovenemesis
20th April 2008, 02:45 PM
type "ls -a" in /media, you will find something related to automatic mount/unmount.
Anniedog
20th April 2008, 04:20 PM
I have now successfully installed f9 preview to my system and at last first time since fc6 to a SATA drive. This is absolutely fantastic. Although I have as yet to plug back in both my F8 and Data hard drives.
I am now wishing to add to my f8 grub.conf the f9 preview boot option. I understood clearly that f9 preview is obviously not quite ready for the f8 replacement before I installed. But I did not expect that LABEL is not used and for it seems UUID is used instead. Has anyone any idea if and how I this will work? Has f9 moved away from the LABEL for use of identifying partitions? Any pointers much appreciated. I should have no problems as I could use bios first drive boot option to be able to get to f9, but it would be very handy to find out how this change works in a multiboot system with grub.
Extract from f9 /boot/grub/grub.conf
title Fedora (2.6.25-1.fc9.x86_64)
root (hd0,3)
kernel /boot/vmlinuz-2.6.25-1.fc9.x86_64 ro root=UUID=502af372-3c50-4299-af84-7b445853e444 rhgb quiet
initrd /boot/initrd-2.6.25-1.fc9.x86_64.img
Extract from f9 /etc/fstab
UUID=502af372-3c50-4299-af84-7b445853e444 / ext3
Anniedog
20th April 2008, 05:22 PM
Well I did it the easy way I have added the f8 drive to the f9 preview grub.conf so I can at last boot from my sata drive into either sata xp,f9 preiew or fc6 or PATA f8. Preview f9 seems very good even at this stage. Just a little fiddling to get livna development repo and I can now play with the stuff I want. Firefox 3 seems good the whole feel of the machine seems to be much faster.
For ref my grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,3)
# kernel /boot/vmlinuz-version ro root=/dev/sda4
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=20
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.25-1.fc9.x86_64)
root (hd0,3)
kernel /boot/vmlinuz-2.6.25-1.fc9.x86_64 ro root=UUID=502af372-3c50-4299-af84-7b445853e444 rhgb quiet
initrd /boot/initrd-2.6.25-1.fc9.x86_64.img
title Fedora (2.6.25-0.234.rc9.git1.fc9.x86_64)
root (hd0,3)
kernel /boot/vmlinuz-2.6.25-0.234.rc9.git1.fc9.x86_64 ro root=UUID=502af372-3c50-4299-af84-7b445853e444 rhgb quiet
initrd /boot/initrd-2.6.25-0.234.rc9.git1.fc9.x86_64.img
title Fedora (2.6.24.4-64.fc8)
root (hd1,0)
kernel /vmlinuz-2.6.24.4-64.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.24.4-64.fc8.img
title Fedora Core (2.6.22.14-72.fc6)
root (hd0,4)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=LABEL=fc6 rhgb quiet
initrd /initrd-2.6.22.14-72.fc6.img
title Other
rootnoverify (hd0,0)
chainloader +1
EDIT
I will now just have to play with the grub config command to see if I can then overcome the editing for kernel updates.
stevea
20th April 2008, 05:46 PM
You really shouldn;t overload two distros in one grub file. Do this instead:
Title F8disk
configfile (hd1,0)/grub/grub.conf
Your way - everytime F8 kernel is updated that change is NOT reflected in your F9 grub.conf.
When that happens twice you'll cease to be able to boot F8.
leigh123linux
20th April 2008, 06:03 PM
Threads merge !
Anniedog
21st April 2008, 03:00 AM
Cheers stevea
yep I was going to sort that out and give it a go sometime. Just having too much fun at the moment trying to sort out a swap problem and playing around with f9 generally..
I assume that configfile just pushes the boot over to the f8 grub on the other drive. The f8 grub is overloaded as well with FC6 and xp . I have had hardware issues with my machine on both F7 and F8I sata drive install not possible. I actually miss every other f8 kernel update on f8 as it is not just a yum update for me, it involves a little more work to install the new kernel especially with my livna nvidia modules as well.
If f9 grub goes down I can just bios change the first boot drive and I should be back to f8.This situation will not exist in a month or so when f9 is released fully and i am happy that everything is working. The plan is to run f9 and xp on this machine only.(until the next one that is). The f8 hard drive to be added to my wireless f8 desktop. So it really is not that much of an issue for me at present but is very handy to know for the future.
Many thanks to all learnt a lot hope I can pass it on sometime.
Anniedog
23rd April 2008, 12:31 PM
You really shouldn;t overload two distros in one grub file. Do this instead:
Title F8disk
configfile (hd1,0)/grub/grub.conf
Your way - everytime F8 kernel is updated that change is NOT reflected in your F9 grub.conf.
When that happens twice you'll cease to be able to boot F8.
tried this configfile option and a few variations but will not work brings up the f8 grub screen but refuses to boot f8 at all. non existent filesystem errors. I suspect it must be a drive identification problem with the f8 grub.conf. I am not sure but I think I will try chainloader option instead to see if that works.
Anniedog
23rd April 2008, 12:47 PM
Just to clarify things I am using three hard drives in the machine two sata and one pata. Depending on which drive the xp.fc6,f9 preview sata (drive 1) drive or the f8 (drive 2)pata drive is set as first boot obviously sets up which is which. As you can see from. fdisk -l booting from drive 1.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001d730
Device Boot Start End Blocks Id System
/dev/sda1 1 19122 153597433+ 83 Linux
/dev/sda2 19123 38244 153597465 83 Linux
/dev/sda3 38245 44618 51199155 83 Linux
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
26 heads, 27 sectors/track, 445273 cylinders
Units = cylinders of 702 * 512 = 359424 bytes
Disk identifier: 0x00000220
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 116697 40960633+ 7 HPFS/NTFS
/dev/sdb2 116698 175045 20480148 7 HPFS/NTFS
/dev/sdb3 350089 445273 33409935 5 Extended
/dev/sdb4 175046 350088 61440093 83 Linux
/dev/sdb5 350089 350380 102478+ 83 Linux
/dev/sdb6 350381 437901 30719857+ 83 Linux
/dev/sdb7 437902 445224 2570359+ 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa771eacb
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 104391 83 Linux
/dev/sdc2 14 5112 40957717+ 83 Linux
/dev/sdc3 5113 7662 20482875 83 Linux
/dev/sdc4 7663 19457 94743337+ 5 Extended
/dev/sdc5 7663 11486 30716248+ 83 Linux
/dev/sdc6 11487 11741 2048256 82 Linux swap / Solaris
/dev/sdc7 11742 14358 21021021 83 Linux
My f8 drive is shown as sdc the Partition table entries are not in disk order output in fdisk may hold some of the answer.
The f8 grub.conf shows (hd0,0)
title Fedora (2.6.24.4-64.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.24.4-64.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.24.4-64.fc8.img
So I think the f8 boot will only work when this pata drive is set as first boot drive or selected at boot time. It is not too much hassle as overloading the f9 grub.conf does work fine. But I will still play to see if I can make it work .
stoat
23rd April 2008, 03:36 PM
You really shouldn;t overload two distros in one grub file. Do this instead:
Title F8disk
configfile (hd1,0)/grub/grub.conf
Your way - everytime F8 kernel is updated that change is NOT reflected in your F9 grub.conf.
When that happens twice you'll cease to be able to boot F8.tried this configfile option and a few variations but will not work brings up the f8 grub screen but refuses to boot f8 at all. non existent filesystem errors. I suspect it must be a drive identification problem with the f8 grub.conf. I am not sure but I think I will try chainloader option instead to see if that works.Hello Anniedog,
Do I understand this stuff correctly?...
F8 boots normally when the F8 drive is first.
F9 boots normally when the F9 drive is first.
When the F9 drive is first, you can directly boot F8 with the kernel and initrd menu commands in the F9 grub.conf.
When the F9 drive is first, you cannot boot F8 with the configfile command in the F9 grub.conf.
That last thing is probably happening because the F8 grub.conf becomes misconfigured when you boot with the F9 drive first. See what I mean? When you change the BIOS drive order to boot F9, the drives are named and enumerated differently vis-a-vis the F8 grub.conf. Therefore, it is not surprising that nothing in that F8 menu works anymore when you bring it up from F9 with configfile. If you want to boot with the F9 drive and use the configfile command in the F9 grub.conf, then try editing the F8 grub.conf to reflect the new drive order with the F9 drive first.
I am not sure but I think I will try chainloader option instead to see if that works.Okay. But just remember that the chainloader command works differently still. It loads into memory and runs the boot sector code of the target partition. Therefore, it requires that a good and working stage1 be installed there to boot Fedora. You currently have stage1 installed in the F8 drive's MBR for this to be possible...
I can just bios change the first boot drive and I should be back to f8.Now maybe you have a good and working stage1 in both places at once. It's possible (I just tried it). But I don't know what is in the F8 boot sector at this point.
Summarizing:
configfile uses the grub.conf in the targeted partition to create a menu. Information found in that grub.conf is used to find and launch the kernel selected from that menu.
chainloader +1 loads and launches the boot sector code (stage1 in this case) of the target partition (F8 boot partition in this case). The usual sequence of events continues on from that point.
kernel directly launches the kernel of the target partition.
P.S.: You and this person (http://forum.fedoraforum.org/forum/showthread.php?t=186379) should get together and form a club.
Anniedog
23rd April 2008, 04:54 PM
Thanks stoat you got it about right. Yes I think there is a good club being formed. It should be named "well it works". I think it is the editing of the f8 grub.conf that will be the answer. But F9 is now proving very shaky, got no samba networking and other niggles, so I will just leave things as they are. I expect to say bye bye the preview soon.
stoat
23rd April 2008, 05:05 PM
Well, your way works with the kernel and initrd commands. So what if 60 seconds are spent to edit a grub.conf after a kernel update? I could easily stand that even with Fedora.
I just thought it was interesting that you and crainey69 were in parallel universes for a while there. It just occurred to me what you both may have in common: You both are changing the BIOS drive order AND trying to tweak two grub.conf files all at the same time. The effect is to create a moving target. No?
Anniedog
23rd April 2008, 11:51 PM
Well, your way works with the kernel and initrd commands. So what if 60 seconds are spent to edit a grub.conf after a kernel update? I could easily stand that even with Fedora.
I just thought it was interesting that you and crainey69 were in parallel universes for a while there. It just occurred to me what you both may have in common: You both are changing the BIOS drive order AND trying to tweak two grub.conf files all at the same time. The effect is to create a moving target. No?
Yep and Yep again. This is the least of my worries now, the reality has just hit. I have been attempting to see what I can do with samba and networking. Well I know what the preview has done with it and network manager and dchp and well I wont go on. This is a real disappointment after the easy f8 network set up, f9 is looking like a no no for me, unless something drastic happens. It looks as if f8 rules here ok.
crainey69
7th May 2008, 12:30 AM
ha ha... just found this thread and that I'm mentioned. Hey AnnieDog! It appears we're both working now so good! Yes, once I figured out the whole drive order thing, it was easy. And, just a personal opinion, I think it may be easier to chainload f8 from f9 grub than the reverse. Maybe that's just from my personal experience.
Take care folks!
Cory
Anniedog
8th May 2008, 11:31 AM
I just stayed with overloading the two grubs. It really is not a problem as the f8 will mount the f9 directories any way for rescuing f9 files etc. I have just the f9 grub set boot f8 as default with options for f9,fc6 and xp. The f8 grub I have left alone so that it just boots the xp fc6 and itself. So far I have not needed to change boot order in bios as although f9 is buggy and not really functional as a samba client it has actually not been too unstable. Apart from the fact that I have really given the f9 grub some work, the number of restarts I have done trying to get the samba shares to show in f9 must be at least 20. When I boot back into f8 every time it seems that a drive needs to be checked. The problem is just keepng in mind that the boot option changes the drive labels eg sda1 may become sdb1 or even in my case sdc1 in each grub depending on which drive you set to boot from. But anyway we both seem to have things working, just proves that there is more than one way to skin a cat ha ha .Besides it is good to be different well thats what I tell myself, when I really havent got a clue what I am doing which is almost all the time. Best of luck with yours I am just going to go on playing a breaking f9 if I can..
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.