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.
|
 |
|
01-06-2005, 03:41 PM
|
#16
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
-------------------
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
|
|
|
01-06-2005, 07:41 PM
|
#17
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
01-06-2005, 07:56 PM
|
#18
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
01-06-2005, 08:36 PM
|
#19
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
01-07-2005, 12:12 AM
|
#20
|
Member
Registered: Jun 2004
Location: Melbourne, Australia
Distribution: Slackware 9.1
Posts: 33
Rep:
|
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.
|
|
|
01-08-2005, 12:31 PM
|
#21
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
01-08-2005, 12:39 PM
|
#22
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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.
|
|
|
01-08-2005, 12:54 PM
|
#23
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
01-08-2005, 01:07 PM
|
#24
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
01-08-2005, 01:11 PM
|
#25
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
01-09-2005, 05:20 PM
|
#26
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
Nothing?
|
|
|
01-09-2005, 05:41 PM
|
#27
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
01-09-2005, 11:31 PM
|
#28
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
01-09-2005, 11:44 PM
|
#29
|
Member
Registered: Jun 2004
Location: Melbourne, Australia
Distribution: Slackware 9.1
Posts: 33
Rep:
|
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...
|
|
|
01-10-2005, 12:04 AM
|
#30
|
LQ Newbie
Registered: Jan 2005
Posts: 17
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 05:30 PM.
|
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
|
|