LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-27-2010, 10:15 AM   #1
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
LFS6.6 - When booting: Fatal error no media


Hi

While trying to boot my LFS i got the: fatal error no media warning.
I did install grub as it says in the book.

Here my devicemap:
Code:
root:/# grub-mkdevicemap --device-map=device.map
root:/# cat device.map
(fd0)	/dev/fd0  (there is none really Vb generates it)
(hd0)	/dev/hda  (Debian Lenny)
(hd1)	/dev/hdb  (LFS)
(hd2)	/dev/hdd  (swap)
root:/#
I need some help on this.

Thanks in advance !
 
Old 05-27-2010, 11:35 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
post your grub.conf. In particular be aware there is a huge difference between addressing hdb, and hdb1
Also nearly all drives these days are sda, sdb, etc as they are go-fast ide types, pata, sata, etc. What grub says applies only to grub.
 
Old 05-27-2010, 05:23 PM   #3
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
I hope this is the right info:

Code:
root:/boot/grub# cat grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6" {
	insmod ext2
	set root=(hd1)
	search --no-floppy --fs-uuid --set 9dd82349-b023-4e37-b53e-23ba12a55b2e
	linux	/boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/hdb ro  
}
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6 (recovery mode)" {
	insmod ext2
	set root=(hd1)
	search --no-floppy --fs-uuid --set 9dd82349-b023-4e37-b53e-23ba12a55b2e
	linux	/boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/hdb ro single 
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
root:/boot/grub#
Thanks in advance !
 
Old 05-28-2010, 04:13 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/hdb ro

That line jars a little. What you can do is select to boot lfs, hit e twice and you get to edit this line. Some issues might be

1. Grub is often installed in /boot. Therefore, if the kernel is in /boot as well the correct path would be /vmlinux-2.6.32.8-lfs-6.6 etc
2. Unless you are using the old deprecated driver, hd(anything) is gone and it is now root=/dev/sdb
3. Drives usually have partitions, so it would normally be /dev/sdb1 even if you have the whole drive as one big / partition.

You can try some combinations, and keep what works
 
Old 05-28-2010, 06:02 AM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by business_kid View Post
That line jars a little. What you can do is select to boot lfs, hit e twice and you get to edit this line.
I suspect that if grub is saying "Fatal error no media" there is something FUBAR about his grub install (grub is looking for its files on the wrong partition?) and he won't get a menu of options to edit.
 
Old 05-28-2010, 09:07 AM   #6
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Hi

here is my host partitions:
Code:
major minor  #blocks  name

   3     0    3145728 hda
   3     1    3140676 hda1
   3    64    9437184 hdb
  22    64     204800 hdd
  22    65          1 hdd1
  22    69     200749 hdd5
dbox:~# root:/boot/grub#
@andrew benton , your right there is no grub menu nothing, it is like BIOS warning thing.

It is exactly:
Code:
FATAL: No bootable medium found! System halted.
@business_kid , ill try to set as sdb1.
Code:
root:/boot/grub# grub-install --grub-setup=/bin/true /dev/sdb1
grub-probe: error: Cannot stat `/dev/sdb1'
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)	/dev/fd0
(hd0)	/dev/hda
(hd1)	/dev/hdb
(hd2)	/dev/hdd
Thanks in advance !

Last edited by ukiuki; 05-28-2010 at 09:20 AM.
 
Old 05-29-2010, 03:59 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
Can you get any linux system (install disk or something) running that box?

type fdisk -l
send us the output.
 
Old 05-29-2010, 08:58 AM   #8
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Hi

here the output:
Code:
dbox:/home/uki# fdisk -l

Disk /dev/hda: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a8e51

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         391     3140676   83  Linux

Disk /dev/hdb: 9663 MB, 9663676416 bytes
16 heads, 63 sectors/track, 18724 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x00000000

Disk /dev/hdb doesn't contain a valid partition table

Disk /dev/hdd: 209 MB, 209715200 bytes
255 heads, 63 sectors/track, 25 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c7878

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1          25      200781    5  Extended
/dev/hdd5               1          25      200749+  82  Linux swap / Solaris
dbox:/home/uki#
Thanks in advance.
 
Old 05-30-2010, 04:29 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
Quote:
Disk /dev/hdb doesn't contain a valid partition table
So you are on the old driver. If you have built a new lfs kernel, that could still be looking for sd instead of hd

The line quoted is your problem. It just may mount as /dev/hdb. If not, better partition it. One partition will do. testdisk might do it painlessly for you if you did partition it
 
Old 05-30-2010, 01:20 PM   #10
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
No luck this program cant recover the partition or anything, if i remember right when i was making the partition i chose the whole disk as a partition, maybe that is why it is in that state.

Thanks in advance.
 
Old 05-31-2010, 04:01 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
Quote:
Disk /dev/hdb: 9663 MB, 9663676416 bytes
16 heads, 63 sectors/track, 18724 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x00000000

Disk /dev/hdb doesn't contain a valid partition table
I have never seen a disk identifier of 0x00000000

Makes me wonder about the disk. Exactly what command did you use to mount that disk when you were building lfs? Can you still mount it that way?
 
Old 05-31-2010, 11:28 AM   #12
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Hi

I know it is really wierd, i can mount the it yes same way as the book says.

this:
Code:
export LFS=/mnt/lfs
mount -v -t ext3 /dev/hdb $LFS
Code:
dbox:~# mount -v -t ext3 /dev/hdb $LFS
/dev/hdb on /mnt/lfs type ext3 (rw)
dbox:~#
Code:
dbox:~# mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/hdb on /mnt/lfs type ext3 (rw)
dbox:~#

TestDisk
Code:
Disk /dev/hda - 3221 MB / 3072 MiB - VBOX HARDDISK
Disk /dev/hdb - 9663 MB / 9216 MiB - VBOX HARDDISK
Disk /dev/hdc - 30 MB / 28 MiB (RO) - VBOX CD-ROM
Disk /dev/hdd - 209 MB / 200 MiB - VBOX HARDDISK
All data from LFS installation is there.
Code:
dbox:~# ls /mnt/lfs/
bin   dev	  etc	lib	    media  opt	 root  sources	sys  usr
boot  device.map  home	lost+found  mnt    proc  sbin  srv	tmp  var
dbox:~#

Something different this time when i did fdisk -l
it doesn't say no valid partition this time:
Code:
dbox:~# fdisk -l /dev/hdb

Disk /dev/hdb: 9663 MB, 9663676416 bytes
16 heads, 63 sectors/track, 18724 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
dbox:~#

Thanks in advance!
 
Old 06-01-2010, 04:28 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,015

Rep: Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277Reputation: 2277
Quote:
I know it is really wierd, i can mount the it yes same way as the book says.
Well, congratulations on keeping THAT secret when everybody thought your hard disk was falling apart! I am sure I speak for others when I mention that that information would have been helpful earlier.

have you made the lfs kernel yet? Presuming you have, follow the book carefully. Also be aware that(presuming this is an ide drive on your system) what you see as hdb in your old system could appear as sd<something> in your new one. You really need to stick in the uuid. Follow this:
http://liquidat.wordpress.com/2007/1.../> hard-disks/

Then close this thread.
 
Old 06-01-2010, 09:13 AM   #14
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

Code:
export LFS=/mnt/lfs
mount -v -t ext3 /dev/hdb $LFS
When I first noticed I could not believe it. But it is actually possible to format a drive without partition table. I just tried it with an external drive of mine and it worked. It also had its disk identifier set to 0x00000000 and was mountable. However, I am not sure if such a disk is bootable. Didn't try it, didn't want to risk reinstalling my system.
So what you apparently did was formatting your entire drive without a valid partition table and then installing on it. Trying to install grub on hdbx or sdbx is not going to work.
So here is my suggestion to fix that:

First, backup your entire hdb drive
Code:
dd if=/dev/hdb of=~/hdb.img bs=1024
Then use parted to try to "recover" a lost partition.
Code:
parted /dev/hdb rescue 0MB 9663MB
Note, that this did not work on my test. But you should give it a shot anyway.
If it does not succeed proceed as following:
Code:
parted /dev/hdb mklabel msdos
parted /dev/hdb mkpart p ext2 0MB 9663MB
parted might give a warning about a misaligned partition at this point which you can ignore.
Code:
mke2fs -v -j /dev/hdb1
mount /dev/hdb1 /mnt/lfs
mkdir /mnt/image
mount -o loop ~/hdb.img /mnt/image
cp -a /mnt/image/* /mnt/lfs
umount /mnt/image
Now chroot into /mnt/lfs. Don't forget to mount /dev /proc /sys as stated in the book. Run grub again.
I have not tested this, so there is no warranty that this will work. Good luck.

@business_kid: I tried to follow your link but it seems to be broken.
 
Old 06-01-2010, 12:43 PM   #15
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Original Poster
Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Thanks for the info guys, ill try that,

Quote:
Originally Posted by business_kid
(presuming this is an ide drive on your system)
Actually it is a virtual hard drive. My host is an Debian lenny in a VirtualBox. (I thought was safer go this way)

i think this is the right link:
http://liquidat.wordpress.com/2007/1...of-hard-disks/

Using the commands mentioned there here is the output:
Code:
dbox:/home/uki# blkid /dev/hdb
/dev/hdb: UUID="9dd82349-b023-4e37-b53e-23ba12a55b2e" TYPE="ext3"
Code:
dbox:/home/uki# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2010-05-31 07:47 3c294291-cd13-4191-91bb-b65952f0153a -> ../../hda1
lrwxrwxrwx 1 root root  9 2010-05-31 07:47 9dd82349-b023-4e37-b53e-23ba12a55b2e -> ../../hdb
Code:
dbox:/home/uki# vol_id /dev/hdb
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=9dd82349-b023-4e37-b53e-23ba12a55b2e
ID_FS_UUID_ENC=9dd82349-b023-4e37-b53e-23ba12a55b2e
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=

Thanks in advance!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fatal Error in Booting OpenSUSE 10.3 Friendly-Mike SUSE / openSUSE 14 01-08-2008 01:07 AM
Fatal Error in Booting OpenSUSE 10.3 Friendly-Mike Linux - Newbie 2 12-31-2007 03:03 PM
FATAL ERROR when booting dont_stop_me Linux - Newbie 3 09-25-2005 06:22 AM
Graphics Install fails with a fatal media/hardware error rraghuram Fedora - Installation 4 08-10-2005 01:27 PM
Fatal error when booting. Rutnut Linux - Software 3 06-15-2005 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:44 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