LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-26-2009, 02:32 PM   #16
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264

You probably need to open a root shell instead of a user shell. Your prompt should be like root@knoppix#:
 
Old 10-27-2009, 11:16 AM   #17
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: Mandrake 9.2 and MNF
Posts: 512

Original Poster
Rep: Reputation: 30
Here are the results
Code:
root@Microknoppix:/# mkdir /mnt/temp
root@Microknoppix:/# mount /dev/sda5 /mnt/temp
root@Microknoppix:/# chroot /mnt/temp
[root@Microknoppix /]# lilo -b /dev/sda5
Ignoring entry 'boot'
Warning: '/proc/partitions' does not exist, disk scan bypassed
Added linux-secure
Added linux
Added linux-nonfb
Added failsafe
Fatal: open /dev/hda1: No such device or address
[root@Microknoppix /]#
Does that mean installing LILO worked, and the error is just because I've removed hda1 (the IDE drive?) or did the whole thing fail.

How can I use my Knoppix CD to get into my Mandrake Desktop? thanks!

Last edited by Avatar; 10-27-2009 at 11:26 AM.
 
Old 10-27-2009, 11:37 AM   #18
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264
From the chroot environment, what did your /etc/fstab look like? I suspect that error is associated with that. Did you also edit the lilo.conf file before you ran lilo -b? You'll have to modify it to boot the partition now that the /dev/hda is gone.
 
Old 10-27-2009, 02:59 PM   #19
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: Mandrake 9.2 and MNF
Posts: 512

Original Poster
Rep: Reputation: 30
I did not edit lilo.conf or anything else, I only typed the commands you gave me...

Here is the output, interestingly my W2K/Mandrake drive is labelled as hdc, and not sda? Yet it is the same physical drive?

Code:
[root@Microknoppix /]# cat /etc/fstab
/dev/hdc5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdc7 /home ext3 defaults 1 2
/dev/hdb /mnt/cdrom auto user,noauto,ro 0 0
/dev/fd0 /mnt/floppy auto user,codepage=850,noauto,sync,iocharset=iso8859-15,exec 0 0
/dev/hda1 /mnt/win_c vfat codepage=850,iocharset=iso8859-15 0 0
/dev/hdc1 /mnt/win_c2 ntfs ro,iocharset=iso8859-15 0 0
none /proc proc defaults 0 0
/dev/hdc6 swap swap defaults 0 0

[root@Microknoppix /]# cat /etc/lilo.conf
boot=/dev/hda
map=/boot/map
# vga=normal
default="Win2K_Server"
keytable=/boot/us.klt
prompt
nowarn
timeout=200
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz-secure
	label="linux-secure"
	root=/dev/hdc5
	initrd=/boot/initrd-secure.img
	append="devfs=mount acpi=ht resume=/dev/hdc6 splash=silent"
	read-only
image=/boot/vmlinuz
	label="linux"
	root=/dev/hdc5
	initrd=/boot/initrd.img
	append="devfs=mount acpi=ht resume=/dev/hdc6 splash=silent"
	vga=788
	read-only
image=/boot/vmlinuz
	label="linux-nonfb"
	root=/dev/hdc5
	initrd=/boot/initrd.img
	append="devfs=mount acpi=ht resume=/dev/hdc6"
	read-only
image=/boot/vmlinuz
	label="failsafe"
	root=/dev/hdc5
	initrd=/boot/initrd.img
	append="failsafe devfs=nomount acpi=ht resume=/dev/hdc6"
	read-only
other=/dev/hda1
	label="Windows_ME"
	table=/dev/hda
other=/dev/hdc1
	label="Win2K_Server"
	table=/dev/hdc
	map-drive=0x80
	   to=0x81
	map-drive=0x81
	   to=0x80
[root@Microknoppix /]#
 
Old 10-27-2009, 05:16 PM   #20
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264
Sorry. Old versions of linux handled SATA and IDE drives differently than today. Assuming that this is a SATA drive (which you mentioned above), my guess is that you will want to change your fstab to look like this:
Code:
/dev/sda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/sda7 /home ext3 defaults 1 2
/dev/hdb /mnt/cdrom auto user,noauto,ro 0 0
/dev/fd0 /mnt/floppy auto user,codepage=850,noauto,sync,iocharset=iso8859-15,exec 0 0
#/dev/hda1 /mnt/win_c vfat codepage=850,iocharset=iso8859-15 0 0 <-- You removed this drive
/dev/sda1 /mnt/win_c2 ntfs ro,iocharset=iso8859-15 0 0
none /proc proc defaults 0 0
/dev/sda6 swap swap defaults 0 0
I would probably from the chroot environment do a cp /etc/fstab /etc/fstab.old so you have a backup copy to mess with if you need it. Then you can modify /etc/fstab. You can either remove or comment out the /dev/hda1 line since you removed that drive.

Then make a copy of lilo.conf the same way (cp /etc/lilo.conf /etc/lilo.conf.old) and edit it to look like this:
Code:
boot=/dev/sda5
map=/boot/map
# vga=normal
default="Win2K_Server"
keytable=/boot/us.klt
prompt
nowarn
timeout=200
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz-secure
	label="linux-secure"
	root=/dev/sda5
	initrd=/boot/initrd-secure.img
	append="devfs=mount acpi=ht resume=/dev/sda6 splash=silent"
	read-only
image=/boot/vmlinuz
	label="linux"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="devfs=mount acpi=ht resume=/dev/sda6 splash=silent"
	vga=788
	read-only
image=/boot/vmlinuz
	label="linux-nonfb"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="devfs=mount acpi=ht resume=/dev/sda6"
	read-only
image=/boot/vmlinuz
	label="failsafe"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="failsafe devfs=nomount acpi=ht resume=/dev/sda6"
	read-only
#other=/dev/hda1
#	label="Windows_ME"
#	table=/dev/hda
other=/dev/sda1
	label="Win2K_Server"
	table=/dev/sda
#	map-drive=0x80
#	   to=0x81
#	map-drive=0x81
#	   to=0x80
You can comment out/delete the /dev/hda1 lines for ME again. You probably won't need the map-drive functions for Win2k since this will be the primary drive now.

You may also need to look at the file /boot/map that gets called in the beginning of lilo.conf.

Anyway, when you're done editing lilo.conf, you run the lilo -b command to install it to the / partition. Then you need to create a boot floppy or use another bootloader to chainload it. I like XOSL on floppy or CD. It's got a nice intuitive graphical interface.

Last edited by pljvaldez; 10-27-2009 at 05:17 PM.
 
Old 10-28-2009, 10:37 AM   #21
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: Mandrake 9.2 and MNF
Posts: 512

Original Poster
Rep: Reputation: 30
Question

That was an awesome post, thanks for the detail, it helped. Everything went well this time:

Code:
[root@Microknoppix /]# lilo -b /dev/sda5
Ignoring entry 'boot'
Warning: '/proc/partitions' does not exist, disk scan bypassed
Added linux-secure
Added linux
Added linux-nonfb
Added failsafe
Added Win2K_Server *
However, I couldn't figure out how to install XOSL to a floppy; it seems to be something you install on your hard disk.

I am wondering if it would be possible to make a GRUB boot floppy disk (I found instructions) from Knoppix, and use that to boot the LILO installed on /dev/sda5?
 
Old 10-28-2009, 11:41 AM   #22
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264
Yup, you could do that to. Your menu.lst file should look something like this
Code:
title Mandrake
root (hd0,4)
chainloader +1
boot
Grub counts hard disks and partitions starting from zero. So the first drive (sda) should be hd0. The first partition would be partition 0. So sda1 = (hd0,0), sda2 = (hd0,1), etc. which makes sda5 = (hd0,4).
 
Old 10-28-2009, 11:53 AM   #23
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: Mandrake 9.2 and MNF
Posts: 512

Original Poster
Rep: Reputation: 30
Well, it worked!
I didn't know how to do the menu.lst so I typed in the commands at the prompt and it worked great. It got me over to lilo on my Mandrake 9.2 (!) install.

I was very happy to see my old Mandrake loading screen.

Only problem now is I'm encountering a kernel panic (no init found) so now that I'm that far I can look into how to resolve that.

Thank you for all your help.
 
Old 10-29-2009, 11:34 AM   #24
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: Mandrake 9.2 and MNF
Posts: 512

Original Poster
Rep: Reputation: 30
Turns out you cannot edit a Mandrake lilo from Knoppix

Knoppix was seeing my drive as sda while Mandrake was seeing it as hdc. So I couldn't update my LILO from within Knoppix.

Managed to find my original install CD (from 2003!) and set it up that way. Now I can boot in. Thanks for the help!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how can a boot sector be repaired to then allow grub to install for chainload booting james2b Linux - Newbie 20 10-08-2009 10:07 PM
How to create a boot sector under Linux? Keithj Linux - Hardware 6 06-17-2008 05:35 PM
Setting up a /boot sector after windows and linux are installed? lifeforce4 Linux - Newbie 11 02-19-2008 05:47 PM
Linux Boot partition - maximum sector on HD VicRic Linux - General 3 10-07-2006 03:47 PM
Linux Installation: Boot Sector too big!! dewang Linux - Software 2 01-15-2001 10:34 AM


All times are GMT -5. The time now is 09:31 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration