Unix Technical Forum

LILO guru, anyone???

This is a discussion on LILO guru, anyone??? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> In alt.os.linux.slackware Lars <noemail@hotmail.com> wrote: >> >> Sorry, my mistake. It should be: >> >> rdev /whatever/path/vmlinuz /dev/hda2. >> ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-19-2008, 03:49 PM
Realto Margarino
 
Posts: n/a
Default Re: LILO guru, anyone???

In alt.os.linux.slackware Lars <noemail@hotmail.com> wrote:
>>
>> Sorry, my mistake. It should be:
>>
>> rdev /whatever/path/vmlinuz /dev/hda2.
>>
>> That will make the vmlinuz image file bootable on /dev/hda2/ where
>> it was once bootable on /dev/hdc2

>
> That makes more sense. So with your approach:
> 1) Run /sbin/lilo with a lilo.conf that has
> boot=/dev/hdc
> root=/dev/hdc2


Now, you have to change the hdc in lilo.conf to hda as well. all rdev
does (in this context) is tell the kernel what the root should be.

rdev tells the kernel that you are using hda2 and lilo.conf tells
the bootloader that you are using hda2.

> 2) rdev (path to kernel) /dev/hda2.
>
> 3) Move disk from /dev/hdc to /dev/hda


Change lilo.conf to read /dev/hda and /dev/hda2 instead of /dev/hdc
/hdc2.

> I will try that. Meanwhile, I came up with a similar solution that
> seems to work:
>
> 1) "/sbin/lilo -r /mnt -C /etc/lilo_inst.conf " The file lilo_inst.conf has:
> boot=/dev/hdc
> root=/dev/hda2
> (The regular /etc/lilo.conf is untouched [boot=/dev/hda, root=hda2])
>
> 2) Move disk from /dev/hdc to /dev/hda
>
> I tried my procedure, and it seems to work. The only concern I have
> is some warnings during boot (the lines below repeats three times):
> hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
> hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
>
> Also, the first boot it always claims the disk has not been fsck:ed for
> 49782 days (or something) and forces a check. Odd...
>
> I have not yet had time to try with a different disk, but I do not
> recall having this problem with this disk earlier.
>
> Do you (or anyone) see any problem with my procedure above?


Well yeah, those error messages are no good.

cordially, as always,

rm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-19-2008, 03:49 PM
Eric Moors
 
Posts: n/a
Default Re: LILO guru, anyone???

Lars wrote:

> Hi,
>
> I am trying setup a fairly automated linux installation procedure
> that uses a Linux "installation server" where I simply connect a
> blank IDE disk as /dev/hdc and run a script that partitions,
> formats, installs the FS, etc.
>
> All is working very well except for LILO: Is there a way to
> install LILO on a harddisk that is currently mounted as /dev/hdc
> so that it will work when the harddisk is moved to /dev/hda?
>
> In other words, the disk is at /dev/hdc during the installation,
> but after that it will be moved to the new computer and become
> /dev/hda. I am trying to accomplish this without having to boot
> from CD or floppy and run lilo manually on the new computer.
>
> -------------------------------
> # Start LILO global section
> boot = /dev/hda
> message = /boot/boot_message.txt
> #prompt
> timeout = 100
> # Override dangerous defaults that rewrite the partition table:
> change-rules
> reset
> vga = normal
> # End LILO global section
> # Linux bootable partition config begins
> image = /boot/vmlinuz
> root = /dev/hda2
> label = Linux
> read-only
> # Linux bootable partition config ends
> -------------------------------
>
> Any help would be very much appreciated!


I am not completely sure but I guess this would work:

-------------------------------
# Start LILO global section
boot = /dev/hdc
message = /boot/boot_message.txt
#prompt
timeout = 100
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
vga = normal

disk=/dev/hdc
bios=0x80

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda2
label = Linux
read-only
# Linux bootable partition config ends
-------------------------------

success,

Eric

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-19-2008, 03:50 PM
joseph philip
 
Posts: n/a
Default Re: LILO guru, anyone???

No. There is no way to tell lilo to pretend that hdc will be used as hda.
Look at using GRUB. It's not so tightly bound to the disk geometry and ID.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-19-2008, 03:50 PM
P.T. Breuer
 
Posts: n/a
Default Re: LILO guru, anyone???

In alt.os.linux joseph philip <joseph@nntp.will.suffice> wrote:
> No. There is no way to tell lilo to pretend that hdc will be used as hda.


Ys ther eis. You can tell it what disk to use, and what bios code
to use for that disk, separately. Whether that will actually work, I
don't know ... it depends on precisely what the code lilo writes to
the boot sector is, so it's in the domain of "suck it and see".

> Look at using GRUB. It's not so tightly bound to the disk geometry and ID.


?? Grub is incomprehensible.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-19-2008, 03:50 PM
Ivan
 
Posts: n/a
Default Re: LILO guru, anyone???

On Fri, 24 Sep 2004 09:56:06 -0400, joseph philip wrote:

> No. There is no way to tell lilo to pretend that hdc will be used as hda.
> Look at using GRUB. It's not so tightly bound to the disk geometry and ID.


did you maybe read lilo how-to?
http://www.tldp.org/HOWTO/LILO-4.html


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-19-2008, 03:50 PM
JohnInSD At san DOT rr dot COM
 
Posts: n/a
Default Re: LILO guru, anyone???

If you use LILO 22.6 (current release) then with a full setup on /dev/hdc, and
the root partition mounted as /mnt/diskC. It is also a good idea to label the
filesystem (tune2fs), as then it may be referenced by label, no matter where
it is actually mounted.


> lilo -r /mnt/diskC -b /dev/hdc


The config file should specify the kernel relative to the root of the new
filesystem.

boot=/dev/hda # overridden on the command line
#map=/boot/map # this is the default
....
image=/boot/vmlinuz # /boot means /boot on /dev/hdc?
root="LABEL=new" # more general than root=/dev/hda?
# root=/dev/hda? # must use this if FS is not labeled
# hda? is where the FS will be mounted later




LILO is now much more general that GRUB, in that it does not determine BIOS
device codes until boot-time.


On Fri, 24 Sep 2004 00:18:18 GMT, "Lars" <noemail@hotmail.com> wrote:

>Hi,
>
>I am trying setup a fairly automated linux installation procedure
>that uses a Linux "installation server" where I simply connect a
>blank IDE disk as /dev/hdc and run a script that partitions,
>formats, installs the FS, etc.
>
>All is working very well except for LILO: Is there a way to
>install LILO on a harddisk that is currently mounted as /dev/hdc
>so that it will work when the harddisk is moved to /dev/hda?
>
>In other words, the disk is at /dev/hdc during the installation,
>but after that it will be moved to the new computer and become
>/dev/hda. I am trying to accomplish this without having to boot
>from CD or floppy and run lilo manually on the new computer.
>
>-------------------------------
># Start LILO global section
>boot = /dev/hda


Override on the command line. Good for when the disk is re-inserted as hda

>message = /boot/boot_message.txt
>#prompt
>timeout = 100


># Override dangerous defaults that rewrite the partition table:
>change-rules
> reset


Totally unnecessary.

>vga = normal


Why use the default setting?

># End LILO global section
># Linux bootable partition config begins
>image = /boot/vmlinuz
> root = /dev/hda2


Fine. But the LABEL syntax, above (requires LILO 22.6) is more general.
Older versions of LILO did not support the LABEL syntax directly, but could do
the same thing with:

append = "root=LABEL=new"

Please note that the punctuation (quotes) will be different with this older
workaround.

> label = Linux
> read-only
># Linux bootable partition config ends
>-------------------------------
>
>Any help would be very much appreciated!
>
>Thanks,
>
>Lars
>


--John

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 02-19-2008, 03:50 PM
Bit Twister
 
Posts: n/a
Default Re: LILO guru, anyone???

On Fri, 24 Sep 2004 14:38:17 GMT, JohnInSD At san DOT rr dot COM wrote:
>
> boot=/dev/hda # overridden on the command line
> #map=/boot/map # this is the default
> ...
> image=/boot/vmlinuz # /boot means /boot on /dev/hdc?
> root="LABEL=new" # more general than root=/dev/hda?
> # root=/dev/hda? # must use this if FS is not labeled
> # hda? is where the FS will be mounted later
>
>
> Fine. But the LABEL syntax, above (requires LILO 22.6) is more general.
> Older versions of LILO did not support the LABEL syntax directly, but could do
> the same thing with:
>
> append = "root=LABEL=new"
>
> Please note that the punctuation (quotes) will be different with this older
> workaround.


If you are going to suggest the label feature, you should at least
tell them how to label the partition. man e2label
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 02-19-2008, 03:50 PM
Lars
 
Posts: n/a
Default Re: LILO guru, anyone???

Works fine now.

Thanks a lot to everybody for all helpful replies!

/ Lars




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 02-19-2008, 03:50 PM
Bit Twister
 
Posts: n/a
Default Re: LILO guru, anyone???

On Fri, 24 Sep 2004 16:14:34 GMT, Lars wrote:
> Works fine now.
>
> Thanks a lot to everybody for all helpful replies!


How sad that you did not provide the solution for people using goolge.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 02-19-2008, 03:50 PM
Lars
 
Posts: n/a
Default Re: LILO guru, anyone???

"Bit Twister" <BitTwister@localhost.localdomain> wrote in message
news:slrncl8lr1.rvf.BitTwister@wb.home.invalid...
> On Fri, 24 Sep 2004 16:14:34 GMT, Lars wrote:
> > Works fine now.
> >
> > Thanks a lot to everybody for all helpful replies!

>
> How sad that you did not provide the solution for people using goolge.


But of course I did! Look at my post from 9/23, 7.40 pm:
-------------------------
Meanwhile, I came up with a similar solution that seems to work:

1) "/sbin/lilo -r /mnt -C /etc/lilo_inst.conf " The file lilo_inst.conf has:
boot=/dev/hdc
root=/dev/hda2
(The regular /etc/lilo.conf is untouched [boot=/dev/hda, root=hda2])
2) Move disk from /dev/hdc to /dev/hda
-------------------------

And with all the later replies, there are at least three other similar
solutions that also works.

Here is the exact solution I decided to use, just for the record:
lilo -r $TARGET_MOUNT -b $TARGET_DISK -C /etc/lilo.conf -v

Where /etc/lilo.conf has:
boot = /dev/hda # Overridden by the -b above to /dev/hdc
root = /dev/hda2

Also, the dma errors (different problem altogether), I fixed with
append = "ide=nodma" in the kernel section.

And again, thanks for all the help!

/ Lars



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com