djgotee
01-21-2004, 10:16 PM
Please excuss those of us who are still learning the wonderful methods of linux. I am new to linux and am very grateful to this forum and specifically to those who are involved in answering questions like what I am about to ask.
First of all, Im sorry if I ask things that seem simple for most of you, now that that is out of the way, are you ready? Heres what I am trying to understand:
The following is from a former post:
Hello
I have the same
Fatal: open /dev/hda: Permission denied
when I'm trying to run lilo. Let me explain the situation.
- I successfully install knx(3.2) with knx-hdinstall (btw, very effective !)
- failed to reboot, because knx hasn't followed (or asked) for some boot
parameters (in my case, ide0=ata66, ide1=ata66 otherwise boot jam !)
- rebooting on the live-cd, mounting hdaX rw, adding the correct append
line.
- sudo chroot /mnt/hdaX, still ok.
- lilo -v ... and Fatal: open /dev/hda: Permission denied
- tried the proposed install-mbr (don't know why it should change smth, but
as I'm not sure, I try), ok, then again same output of lilo.
So, the question is, within the live-cd, how to rewrite the mbr ?
Thanks
(from: http://www.knoppix.net/forum/viewtopic.php?p=8873&highlight=)
--------------------------------------------------------------------------
And what looks like the correct answer:
happily, i found a solution.
Here it is for the sake of completness.
The problem is that chrooting to /mnt/hdaX isolate the pseudo-root, the dev and the proc are not those from the "orignal" working Linux. So obviously lilo won't be able to change the /dev he can't access. So the opposite must be done: bringing on "/" all we need to run the live-cd lilo fct with the lilo.conf config file we want. Note that mine, already located in hdaX, use /vmlinuz and /boot. In the live-cd:
Code:
cd /
rm -f /boot
rm -f /etc/lilo.conf
rm -f /vmlinuz
# easy bc knx added a line in fstab
mount /mnt/hdaX
rm -s /mnt/hdaX/boot /boot
rm -s /mnt/hdaX/etc/lilo.conf /etc/lilo.conf
rm -s /mnt/hdaX/vmlinuz /vmlinuz
# this one works.
lilo -v
That was just that. :wq
---------------------------------------------------------
My delema as accuratly as I can ask you :
What does this mean in a non code writing person's format?
I mean, who has the patience to translate this to a stupid idiot like me?
I am totally confused and not only need a translation but a complete walk through.
I really wish to find a way to write the mbr with lilo from the live CD for times when the mbr gets corrupted or otherwise lost.
What I have been doing is writing the partition table in cfdisk from the live CD ( when I know how the partitions esesentially were originally constructed, so as not to damage any existing files) Then when the partition table is good to go(not formatting of course), I reinstall windows to complete the writting of the rest of the mbr code (the pointing mechanism that points to the OS).
But what Id prefer to do is just install lilo into the mbr as a boot device by altering the lilo.conf file.
Who may be up to teaching me this?
Thanks , steven from florida
First of all, Im sorry if I ask things that seem simple for most of you, now that that is out of the way, are you ready? Heres what I am trying to understand:
The following is from a former post:
Hello
I have the same
Fatal: open /dev/hda: Permission denied
when I'm trying to run lilo. Let me explain the situation.
- I successfully install knx(3.2) with knx-hdinstall (btw, very effective !)
- failed to reboot, because knx hasn't followed (or asked) for some boot
parameters (in my case, ide0=ata66, ide1=ata66 otherwise boot jam !)
- rebooting on the live-cd, mounting hdaX rw, adding the correct append
line.
- sudo chroot /mnt/hdaX, still ok.
- lilo -v ... and Fatal: open /dev/hda: Permission denied
- tried the proposed install-mbr (don't know why it should change smth, but
as I'm not sure, I try), ok, then again same output of lilo.
So, the question is, within the live-cd, how to rewrite the mbr ?
Thanks
(from: http://www.knoppix.net/forum/viewtopic.php?p=8873&highlight=)
--------------------------------------------------------------------------
And what looks like the correct answer:
happily, i found a solution.
Here it is for the sake of completness.
The problem is that chrooting to /mnt/hdaX isolate the pseudo-root, the dev and the proc are not those from the "orignal" working Linux. So obviously lilo won't be able to change the /dev he can't access. So the opposite must be done: bringing on "/" all we need to run the live-cd lilo fct with the lilo.conf config file we want. Note that mine, already located in hdaX, use /vmlinuz and /boot. In the live-cd:
Code:
cd /
rm -f /boot
rm -f /etc/lilo.conf
rm -f /vmlinuz
# easy bc knx added a line in fstab
mount /mnt/hdaX
rm -s /mnt/hdaX/boot /boot
rm -s /mnt/hdaX/etc/lilo.conf /etc/lilo.conf
rm -s /mnt/hdaX/vmlinuz /vmlinuz
# this one works.
lilo -v
That was just that. :wq
---------------------------------------------------------
My delema as accuratly as I can ask you :
What does this mean in a non code writing person's format?
I mean, who has the patience to translate this to a stupid idiot like me?
I am totally confused and not only need a translation but a complete walk through.
I really wish to find a way to write the mbr with lilo from the live CD for times when the mbr gets corrupted or otherwise lost.
What I have been doing is writing the partition table in cfdisk from the live CD ( when I know how the partitions esesentially were originally constructed, so as not to damage any existing files) Then when the partition table is good to go(not formatting of course), I reinstall windows to complete the writting of the rest of the mbr code (the pointing mechanism that points to the OS).
But what Id prefer to do is just install lilo into the mbr as a boot device by altering the lilo.conf file.
Who may be up to teaching me this?
Thanks , steven from florida