LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-17-2005, 01:10 PM   #1
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Rep: Reputation: 15
GRUB wants kernel path


After a broken partition it appears files can be read again so I reinstalled GRUB on another HD to point to the 200gb drive where my beloved FC is located.

However, when booting it asks for a path to the kernel. How do I find out what it is?

Many thanks
 
Old 10-17-2005, 01:30 PM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Hello!

the kernel is located in the /boot directory.

So kernelpath is then /boot/(name of kernel).

Greetings
 
Old 10-17-2005, 01:31 PM   #3
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Thank you. and is there a way to query the name?
 
Old 10-17-2005, 01:34 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Boot into another distro, mount the partition then use ls /path/to/boot to list the contents of /boot. If you've not got another distro installed, use a live CD
 
Old 10-17-2005, 01:55 PM   #5
dhlawrence
Member
 
Registered: May 2005
Location: salem county , New Jersey
Distribution: PCLinuxOS .92
Posts: 59

Rep: Reputation: 15
An answer

Get your hands on the great Mepis 3.3 live cd (or another live distro of
lesser quality) and put in your cd-rom and boot to its desktop. Then you
can navigate to the Fedora boot folder and get the kernel name.
If Fedora has a grub folder in the boot folder, you can copy the info
you need from the menu.lst file located in the grub folder.

MEPIS ROCKS
 
Old 10-17-2005, 01:56 PM   #6
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
/boot/ :

System.map-2.6.10-1.770_FC3
System.map-2.6.11-1.14_FC3
System.map-2.6.11-1.27_FC3
System.map-2.6.9-1.667
config-2.6.10-1.770_FC3
config-2.6.11-1.14_FC3
config-2.6.11-1.27_FC3
config-2.6.9-1.667
grub
initrd-2.6.10-1.770_FC3.img
initrd-2.6.11-1.14_FC3.img
initrd-2.6.11-1.27_FC3.img
initrd-2.6.9-1.667.img
vmlinuz-2.6.10-1.770_FC3
vmlinuz-2.6.11-1.14_FC3
vmlinuz-2.6.11-1.27_FC3
vmlinuz-2.6.9-1.667


/boot/grub :

device.map
e2fs_stage1_5
fat_stage1_5
ffs_stage1_5
grub.conf
iso9660_stage1_5
jfs_stage1_5
menu.lst
minix_stage1_5
reiserfs_stage1_5
splash.xpm.gz
stage1
stage2
ufs2_stage1_5
vstafs_stage1_5
xfs_stage1_5

hmm no files ending on .kernel......
Which of these paths does grub want?Would it be the vmlinuz-2.6.9-1.667 ?

Thank you. Getting more hopeful with every post

Last edited by TotalLinuxNoob; 10-17-2005 at 02:30 PM.
 
Old 10-18-2005, 09:58 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The kernel is anything begins with vmlinuz !

Use the highest number after vmlinuz for the latest kernel.


Last edited by saikee; 10-18-2005 at 10:03 AM.
 
Old 11-08-2005, 03:41 PM   #8
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
This thing is harder than expected...

Got a live CD of Ubuntu of a friend today and booted that up [I have attempted fixing grub before but it was not without failure]. There was a grub floppy installer so I used that.
Booted up the floppy and entered the following

root (hd0,0)
Ext2 sys and some hex output //err ext3 actually but whatever
kernel /boot/vmlinuz-2.6.11-1.27_FC3
faulty file or directory or some similar output

obviously boot was out of the question

Tried the same in Terminal under the ubuntu live cd and I managed to set the kernel (hd0,0)/boot/vmlinuz-2.6.11-1.27_FC3 and just to see what would happen entered boot. It returned to terminal from the grub command line.

Back to booting from floppy and installed grub to a different hd[than to where FC is installed on]. Booted that up and this time the ext2 partition was found on (hd1,0) [not hd0,0]. Fair nuff. but still grub refused to set the kernel. Running find /boot/ always returned error 15: file not found. [funnily enough when find was run there was always some floppy drive activity even when grub command line was installed on the hd]

Could this have anything to do with the fact the drive fc is installed on is 200gb?

Thanx all
 
Old 11-08-2005, 04:50 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I believe you are booting the system from a Grub prompt. In that case you need to know the partitions that holds /boot and /

All of them are fully reveal if you do a

fdisk -l

Also the content of /etc/fstab of FC3 is also relevant.

As FC3 /boot has initrd file you need 4 lines of commands to boot FC3

root (hd0,?)
kernel /boot/vmlinuz-2.6.11-1.27_FC3 ro root=/dev/hda?
initrd-2.6.11-1.27_FC3.img
boot

The (hd0,?) should correspond to /boot directory like hda1 or hda2. Remeber Grub count from 0 so hda2 is (hd0,1)

The /dev/hda? should correspond the partition that holds / of the FC3.

The read only (ro) and root= should be added in the kernel statement.

Give it a try as you are quite near.

List the content of fdisk -l, /boot/grub/menu.lst & /etc/fstab here if you still have a problem. To get the last two you need to mount the FC3 partitions, otherwise you will be showing off the equivalents in Ubuntu.
 
Old 11-08-2005, 05:30 PM   #10
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Thanx for the help.

Just booted the floppy disk holding grub..

Yes I am using Grub prompt. erm, Grub.
/Boot is on the FC drive. Full path /Boot/
According to grub there is only one partition on the drive. (hd0,1) gives us nothing. Strange coz there used to be a swap partition on there but obviously not since the partition table was /recovered/recreated


root (hd0,0) Sets. Output:
ext2fs. Partition type 0x83

kernel /boot/vmlinuz-2.6.11-1.27_FC3 ro root=/dev/hda1

This returns the same error - bad file or dir type - error 2
[When in live CD's I always mount the FC drive as hda1 so I presume hda1 is correct]

Should I have passed
ro root=/dev/hda1/Boot?


Will post the contents of the aforementioned files.
 
Old 11-08-2005, 05:47 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The fdisk -l will show up all your disks, all the partitions and how they are called in Linux.

Grub doesn't carry information of your partition. You tell Grub which partition to boot. That is all.

In the kernel statement the ro=read only and root= tells Grub your mounting point of /.
 
Old 11-08-2005, 06:13 PM   #12
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
When passing root (hd0,1) the partition doesn't exist. No probs but there used to be a cache...

fdisk -l
Device Boot Start End Blocks Id System
/dev/hda1 * 1 26203 198094648+ 83 Linux

Disk /dev/hdb: 40.8 GB, 40822161408 bytes
255 heads, 63 sectors/track, 4963 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdb2 2551 3315 6144862+ f W95 Ext'd (LBA)
/dev/hdb5 2551 3315 6144831 7 HPFS/NTFS

Disk /dev/hdc: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdc2 2551 9964 59552955 7 HPFS/NTFS

FSTAB of the FC Drive:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/hdc1 /mnt/ntfs ntfs defaults,ro 0 0
/dev/hdc2 /mnt/ntfs2 ntfs defaults,ro 0 0
/dev/hdd /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_ubject_r:removable_t,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,fscontext=system_ubject_r:removable_t,managed 0 0

/boot/grub/menu.lst

#boot=/dev/hdc
default=0
timeout=5
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.27_FC3)
root (hd1,0)
kernel /boot/vmlinuz-2.6.11-1.27_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.27_FC3.img
title Fedora Core (2.6.11-1.14_FC3)
root (hd1,0)
kernel /boot/vmlinuz-2.6.11-1.14_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.14_FC3.img
title Fedora Core (2.6.10-1.770_FC3)
root (hd1,0)
kernel /boot/vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-1.770_FC3.img
title Fedora Core (2.6.9-1.667)
root (hd1,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Other
rootnoverify (hd0,0)
chainloader +1


Hope it helps...
Thanks
 
Old 11-08-2005, 07:11 PM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Well I detect a serious problem here.

You must have interchanged the disk order and possibly didn't finish a full install.

Your Grub recorded FC3's root was in (hd1,0). That corresponds to hdb1 but it is a 20Gb FAt32 partition. You are therefore using an old installation of FC in a hard disk layout no longer valid in the current box. That isn't a killer but pretty damaging.

The second killer is in fstab Grub has been asked to load /dev/hda2 as the swap partition. Well there isn't a hda2 available as your hda1 grabs the whole 200Gb. Again that confirms your hard disk arrangement has changed significantly. You no longer have a swap partition within the three hard disks.

Without the swap Grub will not be able to load your kernel.

I can see a way out but a reinstall of FC. You should be able to salvage all your FC data now and transfer it into a FAT32 partition.

My suggestion would be reinstall FC in hda but have it partitioned as

hda1 20Gb type 83 for FC
hda5 1Gb for swap (use a logical partition and the first one will be hda5)
leave the rest unallocated for future use.

Alternatively transfer you Windows to the 200Gb disk and use a smaller disk for FC.

My recommendation for a re-install is based on the fact you no longer have a swap partition. If you do may be swapping the cables may get you out of this hole.

I believe your Windows is in hdb1. It will boot OK as long as you do not make any FAT partition in hda. If you do that BIOS will assign it as the "C" drive and your Windows when booting to the same hdb1 will find it a "D" drive. Windows wouldn't like it and you will lose it too.
 
Old 11-09-2005, 05:44 AM   #14
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
One day I couldn't resist the temptation any longer and got the xp cd out so I could install Il2 sturmovik. I believe I disconnected the linux drive [hda] and installed xp on the 80gb drive, 20gb partition.
The dismount was clean but FC refused to boot since then and the partition table seemed corrupt. After trying many utilities which were all obstructed by the fact the drive is 200gb partition doctor managed to 'fix' it through windows.
Since then I have been able to mount the hda1 drive when using live CD's..

I will leave the 200gb drive the way it is; unpartitioned and keeping the data on there. Im either removing xp from the 20gb partition on the 80gb drive [I intentionally made it fat so I could write to it from live CD's] and install Linux on there or, more likely, see if i can delete a partition on the 40gb drive and create a new partition with some unsalvaged memory that is on there.

I will then load Ubuntu onto it. I did like FC but Ubuntu seems equally interesting. It is however, a shame losing my apache installation and other configurations/packages especially now that I am still unable to run a package manager through the uni proxy.

As a last resort, would creating a swap partition on another drive not do it?

I also just recalled the grub installed on the FC drive never functioned b/c it had to run of a 200gb drive which caused problems. Grub always booted of the 40gb drive [hdb] loading the kernel from hda...

Thanx for your time & help

Last edited by TotalLinuxNoob; 11-09-2005 at 05:45 AM.
 
Old 11-09-2005, 06:27 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Yes, installing another distro like Ubuntu can get you out by having a swap partition available. You only need one swap for all the Linux you install in the box.

You then have to alter the swap partition reference in FC's /etc/fstab.

You can migrate all your data from the 40Gb hdb5 to other partitions, delete it and re-create hdb5, say 1Gb large, for the swap with type 82 I think. For Ubuntu a 5Gb in hdb6 will be enough. You can leave empty space unallocated for future use.

Install Ubuntu in hdb6, put its Grub in MBR and Ubuntu should dual boot your PC with the XP.

At that point you can edit Ubuntu's /boot/grub/menu.lst to include FC. Make sure the swap reference in FC's /etc/fstab is /dev/hdb5 and not /dev/hda2

Should work out OK that way.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where's my 'Kernel-output-path' BuckRogers01 Debian 2 07-14-2005 08:13 AM
Finding the kernel path blacksunshine Linux - Software 2 10-03-2004 02:45 PM
What is the path to Linux Kernel source beginner16 Linux - Newbie 4 11-24-2003 04:21 AM
Compiling Kernel (specifying Bash path) ugenn Linux - Software 5 04-02-2003 12:38 PM
path and filename of compressed kernel ? ohernandez Linux - General 3 05-29-2002 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration