LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-30-2005, 10:17 AM   #1
robban59
LQ Newbie
 
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
Can't run LILO error : Fatal:raid_setup:stat("/dev/hdi1")


Hi everybody,

a few days ago I screwed my fine Hoary installation, please help a newbie boot up his beloved Ubuntu again \\/

I was updating the images of the 686 kernels then I misanswered something related to the boot block during the image installs ( YES instead of NO..maybe.), a LILO script was running after the image downloads, so apparently all was well.
But trying to reboot after i get Uncompressing Linux....it stops with CRC ERROR.

So off I go with W2K and UBUNTUFORUMS and GOOGLE, but here I am because I can' t fix it myself.

So my box has 2 PATA HD in RAID-0 with 2 NTFS partitions for W2K and a third HD (SATA) stand-alone for Ubuntu ( named in Ubuntu : hdi ) but here comes my FSTAB:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdi1 / ext3 defaults 0 1
/dev/hdi3 /home ext3 defaults 0 2
/dev/hdi2 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 rw,user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 rw,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hdi4 /media/Win-D ntfs ro,umask=0222 0 0

and here comes my lilo.conf ( I deleted all # lines to save space here ) :
as you can see LILO is installed in the root partition's boot sector of hdi (hdi1), not in the MBR; I boot from W2K by the WIN Utility "bootpart".
__________________________________________________ _____________

boot=/dev/hdi1
root=/dev/hdi1
map=/boot/map
delay=20
vga=normal

default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1
append="expert"
initrd=/initrd.img

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2
append="expert"
initrd=/initrd.img.old

__________________________________________________ ______________

First thing I saw were the missing soft links in / of the vmlinuz and initrd images in /boot, so I recreated them; then I tried to recover by re-running LILO with the lilo.conf appended above and still present in /etc/ by first booting with Hoary LIVE mounting my real / in /media and then chroot etc. and also with Hoary Install running in rescue mode, but everytime I run LILO I get :

Fatal : raid_setup : stat ("dev/hdi1")

Why is this ? hdi is NOT in the raid-0, it is the stand alone HD, and has always been recognised as such ( hdi) by Hoary as long as it booted fine.

Another question : is the line append = "expert" correct ??

I haven't still tried : lilo -r /mnt , somewhere I read that LILO shouldn' t be run with chroot, because I'm afraid to break the box even more.

I can get any file on my Ubuntu installation through W2K by utilizing "explore2fs", so if some logs or conf files are needed just ask.

You know, it is not nice having a nice Hoary installation unable to boot, and being forced to use W2K all the time.. ...
 
Old 05-30-2005, 03:27 PM   #2
robban59
LQ Newbie
 
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
Ok..after a couple of hours fiddling with my system, I have some more info :

I booted with Hoary LIVE CD, then mounted the original Hoary root on my HD to /mnt/ubuntu by

ubuntu@ubuntu: / mount -O suid,dev,rw /dev/hdi1 mnt/ubuntu

then I checked the /proc directory of the original Hoary install and the one of Hoary LIVE and I found that the original one is empty, and the LIVE one has the files relevant for the system, among others also "partitions".

So instead of running lilo straight which gives me the error in the subject of this post, I instead run lilo on the LIVE root but using the lilo.conf of the original installation, also because in the LIVE /etc directory there was no lilo.conf !

So I ran

1) sudo su
2) /sbin/lilo -C /mnt/ubuntu/etc/lilo.conf

and the response was :

Warning : 'proc/partitions' does not match '/dev' directory structure
name change: '/dev dm-0' -> 'dev/dm'
Warning : /dev/hdi1 is not on the first disk = that's OK I want it this way !

Fatal : device mapper : only linear boot device supported

Here we go again with the RAID disks getting in the way, I specify hdi1 which is a SATA stand-alone disk, why does LILO always go after the other two RAID disks ?

I saw in the LIVE /proc/partitions a number of dm-x devices, they must be related to the RAID controller, I don't need them just now to restore lilo, maybe I should try do delete their lines in the /proc/partitions files and try again ?

Thanks for any suggestions.
 
Old 05-31-2005, 12:07 AM   #3
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
lilo will try and write to the mbr if you don't tell it otherwise. since you have raids set up, in what i believe the primary drives, then lilo is complaining that it doesn't have the append="md0" set, (that's wrong, but it's in the man pages, 'man lilo.conf').
you have to tell it where to put the boot drive. take a look at the 'man lilo', it should be -m, or -M /dev/whatever.
when running the live disks, it might mess things up if you don't have things mounted properly. what you can do, if you have a floppy, is to make a grub disk, boot the linux, and then rerun the lilo from the running system. if you can boot from a flashdisk, usb keychain, then you can put it there also.

this is from memory,
if the live disk uses grub to boot, then you can just mount the floppy, and-
cp -p /boot/grub/stage* /mnt/floppy (or whereever)

you'll have to make an ext2fs on the floppy. and then do all of the cping.
or you can wget http://cerberus.cc/open/rescue_disk ./
dd if=rescue_disk of=/dev/fd0

it will take a minute or two to write to the disk, since the fs is on that image also.
then boot from the floppy,
root (hdwhereever)
kernel (whatever)
initrd (whatever)
boot

root (hd0,1)
kernel /vmlinuz
initrd /boot/initrd.img....
boot

it's going to look something like that. when you have the live disk going, take a look at your /boot and write down the kernel and the initrd.img so that you know what they are.

if you remember this, it will say you a lot of headaches later on. maybe it's just me that get's the headaches, but it's nice to know.

Last edited by emetib; 05-31-2005 at 12:08 AM.
 
Old 05-31-2005, 02:38 AM   #4
robban59
LQ Newbie
 
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Emetib for your answer ;

regarding the point you make about indicating to LILO where to put the boot record, isn't that indicated in the lilo.conf in the line " boot=hdi1" ? AFAIK by this line I tell LILO to put the boot record in the first sector of the first partition in HDI, which is the Ubuntu root partition, or do I miss something ?

I'll sure try your suggestion to create a GRUB boot floppy as soon as I'm home again from work !

I'll get back with hopefully good news.

Cheers to all
 
Old 05-31-2005, 04:44 PM   #5
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
yes, that is correct. i was very tired last night when i answered your question.
 
  


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
lilo says, "L 01 01 01" and fdisk says, "Unable to seek on /dev/hda1" clausawits Linux - General 3 12-31-2007 09:33 PM
XIO: fatal IO error 04 (connection reset by peer) on X server ":0.0" Kernel 2.6.5 Slackware 15 10-28-2007 11:53 PM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 02:11 PM
lilo : "Fatal: No images have been defined." nio99 Linux - General 3 10-22-2002 04:22 PM
startx will not start xwindows... "XIO: fatal IO error 104" khermans Linux - Newbie 22 01-09-2002 02:50 AM


All times are GMT -5. The time now is 11:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration