LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 02-05-2004, 08:55 PM   #1
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Rep: Reputation: 15
Running lilo from a boot disk


EDIT: Problem solved (see last post)

OK this stems from a lot of issues but I think I am finally at the end. This is taken from a previous post because I thought it deserved it own.

OK So I am currently booting off of the slackware live CD. So I mount my root partition, I edit lilo as I need to. But the problem is that I can't run lilo to update the changes. here is what i have tried.

Code:
./lilo (in /<mounted root>/sbin)
Fatal: Can't find /etc/lilo.conf
./lilo -C /<mounted root>/etc/lilo.conf 
Fatal: creat /boot/boot.0810 No such file or directory
I figured that booting from a boot disk to fix lilo and reboot would be common thing to do so I thought it would be pretty simple.

Quote:
OK booting of a boot disk... followed your instrution... Got the driver in and the harddrive mounted to /sda I made sure I made all of the changes to the hard drive on /sda and not my boot disk.

The problem is when I get to the end. I am trying to run lilo. so I cd to /sda/sbin/ and type
./lilo
and it can't find the lilo.conf. No problem:
./lilo -C /sda/etc/lilo.conf
then I get
"Fatal: creat /boot/boot.0810 No such file or directory"

Is there another switch for lilo that I need to throw in there?...

Last edited by id10t; 02-08-2004 at 12:24 AM.
 
Old 02-05-2004, 09:29 PM   #2
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
When you change your /etc/lilo/conf on your hard drive, you have to run lilo from the hard drive too. I think that when you have been working, you have actually been using the tools on the boot disk. When you want to edit anything on the hard drive without chroot-ing in to the HD, you have to specify the full path to the file and to the tools you are using. If you want to edit /etc/lilo.conf on your hard drive, you'll have to edit that copy, as your copy on the cdrom won't be edited. Ex: open your editor (I'll use nano as an example, as a lot of distros have it by default and its easy to use):

Pretend your mount point for the HD is /mnt/hda1.

nano -w /mnt/hda1/etc/lilo.conf

edit the file. save it to the place you got it from (as in /mnt/hda1/etc/lilo.conf)

then, run lilo.

/mnt/hda1/sbin/lilo

You should be successful.

Good luck
 
Old 02-05-2004, 10:18 PM   #3
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
That is exactly what I did...

Sorry... maybe I should have been more clear.
 
Old 02-05-2004, 10:33 PM   #4
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
you should be able to run lilo as root. just the command works:

# lilo

could you post your lilo.conf file and partition information?
 
Old 02-05-2004, 11:07 PM   #5
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
OK look... I can't run lilo as root by just typing "lilo" in the console because I am booting of a minimal boot disk.

The only way I can run it is to manually mount my hard drive and go to the directory which it is in. Because lilo naturally tried to find it's config file in /etc/lilo.conf, I had to use the -C switch so that I could point to to where the lilo.conf was actually located.
(Root partition [/dev/sda1] mounted in folder /sda)
Code:
<root@localhost>#/sda/sbin/lilo -C /sda/etc/lilo.conf
Lilo runs... It just errors out because it is using the / directory as it's root instead of /sda/ which is it's root. All I want to know is how to change a setting or something so that it will recognise /dev/sda1 as being the root directory.
 
Old 02-05-2004, 11:22 PM   #6
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
unless i'm misunderstanding you from only getting part of the picture (you mentioned some other thread, so i'm a little unclear on if there is more to the problem), you should be able to boot your system from the slackware disk by entering the right boot parameters at the prompt:

bare.i root=/dev/sda1 noinitrd ro

unless it's some weird scsi issue with your /sda that won't let you ? (or maybe it takes a kernel image other than bare.i). then just run lilo when you're in your system, and not just the cd/disk environment. like i said, i might be misunderstanding your problem, but it seems to me that should work as long as your root system is "viable," so to speak.
 
Old 02-05-2004, 11:47 PM   #7
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
I can't boot into my system without first leading a driver for my SATA drives. That si why i have to first boot to the Slackware CD then load the drivers before I can mount the hd partition.

I mean is there something I can do in the boot parameters that would let me insmod this driver?
 
Old 02-06-2004, 03:59 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
In order to install lilo, after editing /mnt/???/etc/lilo.conf, you need to
chroot /mnt/???
This changes the root device. When you boot from the CD the root device is ramdisk RAM0. if you try to run lilo from there you get those errors. So you must first change root to wherever you have your root partition mounted.
But if you are booting from hardware whose support is not compiled into any of the Slackware kernels you'll have to make a custom syslinx bootdisk
 
Old 02-06-2004, 08:12 AM   #9
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Quote:
Originally posted by gnashley
In order to install lilo, after editing /mnt/???/etc/lilo.conf, you need to
chroot /mnt/???
That was my first premonition, but I thought he'd be able to get in without. Oops.

Try the install instructions for Slack or any of the 'from scratch' distros like LFS or Gentoo. The docs are good and you have to chroot regardless when you install. They'll have a clear way of explaining it (I have seen it on the Gentoo pages under 'installing the system')
 
Old 02-07-2004, 03:31 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I can't find my notes on it right now, but you have to unmount /proc, then chroot, then remount /proc.
 
Old 02-08-2004, 12:22 AM   #11
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
I found the flag for lilo.

Code:
/<mounted HD>/sbin/lilo -r /<mounted HD/
That tells lilo where root should be.

I had someone on #slackware at irc.freenode.org run a "man lilo" for me.
 
  


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
lilo boot disk charlescpc Mandriva 4 12-06-2004 07:34 PM
Lilo lost, Install disk failing to restore Lilo on dual boot? Dobie Linux - Newbie 2 05-05-2004 05:00 PM
Lilo Boot Disk thegamegraal Linux - Newbie 1 06-21-2003 09:16 PM
Lilo Boot Disk BittaBrotha Slackware 7 07-31-2002 12:08 AM
Lilo boot disk error. weblion Linux - General 4 01-06-2002 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

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