LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-06-2005, 03:41 PM   #16
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53

-------------------
image=/boot/vmlinuz-2.4.21-xfs
root=/dev/hda1
label=Linux

read only

image=/vmlinuz.old -------------maybe cut this section ( there's no " root "spec.
label=LinuxOLD ------------or do you have a " linuxOLD " ?
read-only
optional

other=/dev/hda1 ---------------and cut this too , as hda1 is " linux "
label="Other(hda1)"

other=/dev/hda2---------------if you have winnt there, add " table=/dev/hda"
label="WinNT(hda2)"

---------------

and check what permissions " /sbin/lilo " has . ( ls -l /sbin/lilo )
should be executable eh.....

egag
 
Old 01-06-2005, 07:41 PM   #17
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
I did what you said and got rid of Other, WinNT, and LinuxOLD. I think I know where my problem lies. Since I cant boot my system, im using the phlak live CD to boot and fix my lilo.conf, so when i try to execute LiLo, its looking in the CDs sbin for LiLo, and the CD runs off of GRUB (I think). How can i specify what LiLo to run? I keep getting File Not Found, and sometimes Permission Denied (even as root!) I think if I can fix this problem I will be set! Thanks in advance!

- Brad
 
Old 01-06-2005, 07:56 PM   #18
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
if you run from a live -cd: make sure your / partition is mounted rw. ( so you can write to it )

then if you edited the config, do a "#chroot /<mountpoint/of/root/partition> "

then run " #lilo "

egag
 
Old 01-06-2005, 08:36 PM   #19
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Still getting an error, but at least its a hopefull error lol. Thanks for all your help so far! I did what you said and now im getting "Open /dev/hda: Permission Denied"
And when I try su - I get like 20 lines of "-su- Permission Denied"

What to do from here?

Thanks in advance!
- Brad
 
Old 01-07-2005, 12:12 AM   #20
Valindar
Member
 
Registered: Jun 2004
Location: Melbourne, Australia
Distribution: Slackware 9.1
Posts: 33

Rep: Reputation: 15
Quote:
Originally posted by SpyPie
Still getting an error, but at least its a hopefull error lol. Thanks for all your help so far! I did what you said and now im getting "Open /dev/hda: Permission Denied"
And when I try su - I get like 20 lines of "-su- Permission Denied"

What to do from here?

Thanks in advance!
- Brad
As I said before, please post actual console output! I have no idea what command you typed to get the error "Open /dev/hda: Permission Denied"

However I'll wing it again this time:

When I want to reinstall my bootloader from another distro/live cd I do the following:
Code:
# mount /dev/hda1 /mnt/hda1      //Mount my root partition
# mount /dev/hda6 /mnt/hda1/boot     //mount my /boot partition
# cd /mnt/hda1/etc
# cp lilo.conf lilo.conf_bak
# vi lilo.conf_bak
Now I change entries like the following:
image = /boot/vmlinuz to image = /mnt/hda1/boot/vmlinuz
and the initrd lines if applicable, basically anything that refers to a directory, to the correct directory
then I run lilo:
# /mnt/hda1/sbin/lilo -v -C /mnt/hda1/etc/lilo.conf_bak  // -v is verbose, -C specifies the config file because it's not in the default /etc/lilo.conf (not the one I want anyway)
then I can just reboot and it's been reloaded (I then rerun it with the normal config in my normal distro, just for the hell of it)

That's how I do it, the chroot method posted above works fine too, I just have gotten so used to my way it takes me less than a minute.

On the su issue, you might want to look up the live cd's documentation, as live cds sometimes do weird things to the su command.
 
Old 01-08-2005, 12:31 PM   #21
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you, I will be more precise from now on. I did what you said in your post and now lilo is actually running, heres the error I get, lilo runs normally until itmgets to right here...

Writing boot sector.
Fatal: creat /boot/boot.0300: Read-only file system

Ill keep playing around with it, but anything helps.

Thanks!!

- Brad
 
Old 01-08-2005, 12:39 PM   #22
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
as i said, you have to remount your root- ( and if you have it: your boot- ) partition
in read/write mode, before trying to install lilo.

egag

Last edited by egag; 01-10-2005 at 04:23 PM.
 
Old 01-08-2005, 12:54 PM   #23
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, I mounted my HD like this
mount /mnt/hda1 -rw
And I still get the "Fatal: Creat /boot/boot.0300: read-only file system" error.
Am I mounting my drive right?

Thanks in advance!

- Brad
 
Old 01-08-2005, 01:07 PM   #24
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
do you have a separate /boot -partition ?
if so you'll need to mount that to ( r/w)

and are you sure your command worked out ok ?
type " mount " and take a look at what's mounted and how it's mounted.

egag
 
Old 01-08-2005, 01:11 PM   #25
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
I dont have a seperate /boot partition, and "mount" yields

proc on /proc type proc (rw)
/proc on proc type proc (rw)
/dev/hda1 on /mnt/hda1 type ext3 (rw,nosuid,nodev)

Im assuming thar the rw means Read/Write, but I do not know...

The command im running, logged in as root is sudo /mnt/hda1/sbin/lilo -v -C /mnt/hda1/etc/lilo.conf_bak
Ive also done
sudo chmod 777 /mnt/hda1 (recursive)
and sudo chmod 777 /mnt/hda1/boot

I undid these as soon as they did not work for sequrity reasons, obviously though.

Am I doing anything obvious wrong?

Thanks for all your help so far!

- Brad

Last edited by SpyPie; 01-08-2005 at 02:44 PM.
 
Old 01-09-2005, 05:20 PM   #26
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Nothing?
 
Old 01-09-2005, 05:41 PM   #27
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
well....try this :

after you login as root type : " #chroot /mnt/hda1 "
then type " #/sbin/lilo -v "

but reading this........ :
----------
Ive also done
sudo chmod 777 /mnt/hda1 (recursive)
and sudo chmod 777 /mnt/hda1/boot

I undid these as soon as they did not work for sequrity reasons, obviously though.
------------
....... make me think you need a fresh install also.

never do a recursive chmod and the 777 setting opens all for writing by all.

egag
 
Old 01-09-2005, 11:31 PM   #28
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, I formatted and reinstalled PHLAK.
I have two partitions
HDA1 which is type 83 (Linux), bootable, and mounted.
HDA2 which is type 82 (Linux Swap), not bootable, and not mounted.

I edit my lilo.conf, it now looks like this...
Code:
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/',
#                       and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                               |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
#    bios=0x81

#disk=/dev/sda
#    bios=0x80

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda1

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/mnt/hda1/boot/boot-menu.b

# Specifies the location of the map file
#
map=/mnt/hda1/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
#	prompt
#	single-key
#	delay=100
#	timeout=100

# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi noapic acpi=off apm=power-off"

# Boot up Linux by default.
#
default=Linux

image=/mnt/hda1/boot/vmlinuz-2.4.21-xfs
	label=Linux
	root=/mnt/hda1
	read-only
#	restricted
#	alias=1
and im running this command
/mnt/hda1/sbin -v -C /mnt/hda1/etc/lilo.conf
And getting this output

Reading boot sector from /dev/hda
Using MENU secondary loader
Calling map_insert_data

Boot image: /mnt/hda1/boot/vmlinuz-2.4.21-xfs
Added Linux *

Writing boot sector.
Fatal: creat /boot/boot.0300: Read-only file system

Im mounting my root drive with this command
mount /mnt/hda1 -rw

I hope this is enough information to help me past what has been stopping me up to here.

Thanks for all your help so far, its been a real help!!

Thanks in advance!

- Brad
 
Old 01-09-2005, 11:44 PM   #29
Valindar
Member
 
Registered: Jun 2004
Location: Melbourne, Australia
Distribution: Slackware 9.1
Posts: 33

Rep: Reputation: 15
It's trying to create a file in the read-only cdrom filesystem... if you are using a live cd? I don't remember..
however, you should try chrooting:

# chroot /mnt/hda1

then change your lilo.conf to remove /mnt/hda1 wherever you reference it and refer to / instead:

Code:
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/',
#                       and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                               |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
#    bios=0x81

#disk=/dev/sda
#    bios=0x80

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda1

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
#	prompt
#	single-key
#	delay=100
#	timeout=100

# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi noapic acpi=off apm=power-off"

# Boot up Linux by default.
#
default=Linux

image=/boot/vmlinuz-2.4.21-xfs
	label=Linux
	root=/dev/hda1
	read-only
#	restricted
#	alias=1
Oh, and 'root=/mnt/hda1' should've been 'root=/dev/hda1' in the definition of 'Linux', I changed it for you.

Now run:

# /sbin/lilo -v -C <configfile> (presuming it's not /etc/lilo.conf otherwise you can leave off the -C and <configfile> part, oh and if you specify it, remember /mnt/hda1 now = / !! so former /mnt/hda1/lilo.conf now = /lilo.conf until you leave the chroot!)

Then you can 'exit' to leave the chroot environment.

One more thing, that's a monster of an 'append='... you did write it didn't you? If that was a default value and doesn't apply to your system you should remove all the hda=scsi etc. if it's not needed because it might be interfering with something...
 
Old 01-10-2005, 12:04 AM   #30
SpyPie
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Alright, i did exactly what you said and now the error message reads

Warning: /home/User/lilo.conf should be owned by root
Reading boot sector from /dev/hda
Fatal: open /dev/hda: Permission denied
phlak#

What does that mean?

Thanks

- Spy
 
  


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 L 99 error dllmetal Linux - General 10 12-21-2014 03:29 AM
Lilo error mattp Linux - Newbie 11 08-24-2004 10:14 PM
LILO LinuxEBDA error to /usr/bin/gdm error true_atlantis Slackware 0 04-28-2004 01:31 PM
error loading operating system (lilo error) KoKi Slackware 1 03-03-2004 04:46 PM
Lilo error 99 Groucho Slackware 1 09-30-2003 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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