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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-30-2005, 11:17 AM
|
#1
|
LQ Newbie
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3
Rep:
|
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.. ...
|
|
|
05-30-2005, 04:27 PM
|
#2
|
LQ Newbie
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
05-31-2005, 01:07 AM
|
#3
|
Member
Registered: Feb 2003
Posts: 484
Rep:
|
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 01:08 AM.
|
|
|
05-31-2005, 03:38 AM
|
#4
|
LQ Newbie
Registered: May 2005
Location: Italy
Distribution: Ubuntu
Posts: 3
Original Poster
Rep:
|
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
|
|
|
05-31-2005, 05:44 PM
|
#5
|
Member
Registered: Feb 2003
Posts: 484
Rep:
|
yes, that is correct. i was very tired last night when i answered your question.
|
|
|
All times are GMT -5. The time now is 02:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|