LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-01-2005, 03:10 AM   #61
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53

Quote:
mand2006 is on hdb6 and mand2005le is on hdb5.
Are you sure? If so how come your lilo.conf quotes only hda

I suggest you post
fdisk -l if you want some help
 
Old 12-01-2005, 03:31 AM   #62
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Actually there is a simpler way to skin the cat.

If you have Mand2005le working and mand2006 is in the box as partition hdb6 why not mount this partition when running man2005le? change root to it and replicate its boot loader in its root partition so that it can be "chainloaded" by Mand2005le.


while in Mand2005le and log in as root

mkdir /mnt/hda6
mount /dev/hda6 /mnt/hda6
chroot /mnt/hda6 <----------you are inside Mand2006 if no error to this point!!!!!!
lilo -b /dev/hda6 <-------if Mand2006 has only Grub then use "grub-install /dev/hda6", same result.
exit <---------------you are back to Mand2005le

then you add these 2 lines to Mand2005le's /etc/lilo.conf

other=/dev/hda6
label=Mand2006

save Lilo.conf, type lilo again to re-validate, reboot and both systems are yours.
 
Old 12-01-2005, 07:47 AM   #63
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
I suggest you post
fdisk -l if you want some help
Disk /dev/hda: 82.3 GB, 82348277760 bytes
240 heads, 63 sectors/track, 10637 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 5205 39349768+ 7 HPFS/NTFS
/dev/hda2 5206 10637 41065920 5 Extended
/dev/hda5 5206 6017 6138688+ 83 Linux
/dev/hda6 6018 6165 1118848+ 82 Linux swap
/dev/hda7 6166 10637 33808288+ 83 Linux

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 764 6136798+ 83 Linux
/dev/hdb2 765 3453 21599392+ 5 Extended
/dev/hdb5 765 904 1124518+ 82 Linux swap
/dev/hdb6 905 3453 20474811 83 Linux

saikee your method worked.man2005 must be using grub(or it is now) as this "lilo -b /dev/hda6" did not work but this did
"grub-install /dev/hda6". It remapped fd=fd0,hda=hd0,hdb=hd1.
I will have to read back this post to find the grub config file and add
other=/dev/hda6
label=Mand2006
and I should be all done.I have to go to work now.

Thank you.
 
Old 12-01-2005, 08:18 AM   #64
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53
you want to edit /boot/grub/menu.lst on the hdb HD where mandy 2006 is.
Or you could us the mandy gui for this (I could never get it
to recognise well dual or triple, 6-boot etc, on different HD.
I suggest you do it by hand) using kedit or vim, or kwrite
The syntax is different to that of lilo (see man grub)

Lilo good ridance! When something goes wrong because of user error often in my case,
at least in grub you can interactively select the kernel and the partition
you want to start from.
I was going to tell you to use grub instead of lilo.
Some might diagree with that, but lilo / grub is a matter of preference sometimes.

Saikee might have a better suggestion than mine re chainloading the grubs

Can you just confirm the booting order in the bios please (for the HDs)
 
Old 12-01-2005, 10:11 AM   #65
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Any operating system becomes "chainloadable" if it has a boot loader inside its root partition. To put a boot loader inside its partition in Linux you type

lilo -b /dev/hda? for Lilo and
grub-install /dev/hda? for Grub where hda? is the root partition (replace ? with a number to suit your case)

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

To chainloading in Lilo's lilo.conf just add 2 lines (repated here for completeness)

other=/dev/hda?
Label=Linux

To chainload in Grub's /boot/grub/menu.lst, just add

title My Linux in (hd0,?) where ? is partition No-1
root (hd0,?)
chainlader +1

Easy piece!

Kind of embarrassed to tell you guys that is the way I boot 60+ systems!!!!! Nothing to it, isn't it?

Now everybody should be an expert!!!!!!!!!!!!

For different hard disk just change hd0 to hd1 etc.
-----------------------
Notes

(1) The "label" of Lilo is same as "title" for Grub except Lilo uses a fixed field limiting the number of characters. Grub permits any characters in title statement.

(2) The Lilo's "other= " is the same as Grub's "root" combining with "chainloader +1". Indeed one can use

chainloader (hd0,?)+1

to save typing one extra line.

(3) Lilo checks every line in lilo.conf and makes sure every system can be booted before implementing any change in lilo.conf. Grub doesn't. Therefore if you pre-partition the hard disk into 50 partitions you can build a menu.lst with entries booting every empty partition "before" you even install a Linux in it!!!!! The Linux is of course bootable the moment its installation is completed. That is how my menu.lst looks like

title empty @ hdc39
root (hd1,38)
chainloader +1

title empty @ hdc40
root (hd1,39)
chainloader +1

title empty @ hdc41
root (hd1,40)
chainloader +1

..............and so on

Did I type all these entries? No way. I wrote a program to generate it!

Last edited by saikee; 12-01-2005 at 10:36 AM.
 
Old 12-01-2005, 02:52 PM   #66
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53
This is worth posting this as a small tutorial in LQ? I mean chainloading that way
 
Old 12-01-2005, 10:03 PM   #67
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
I resized my win hda down to 40gb and my linux hdb to 20gb successfully.That was so easy instead of making more partitions I thought I would just just install another distro on the empty space of hdb and resize it.
Doooh I'm so stupid sometimes.ok no more working on my box in the wee hrs of the morning only to forget what I did when I wake.(actually I made a mistake from the start)
I did not install mand2005 on hdb5(I wanted it on hdb).I installed it on hda5,6,7 zin being hda1 and hda7 being the large/home part. of mand2005.

I have run: while in Mand2005le and log in as root

mkdir /mnt/hda6
mount /dev/hda6 /mnt/hda6
chroot /mnt/hda6 <----------you are inside Mand2006 if no error to this point!!!!!!
lilo -b /dev/hda6 <-------if Mand2006 has only Grub then use "grub-install /dev/hda6", same result.
exit <---------------you are back to Mand2005le
(I used grub-install /dev/hda6)

If I do this: then you add these 2 lines to Mand2005le's /etc/lilo.conf

other=/dev/hda6
label=Mand2006

Will this still work?
As of now I still have mand2005 and zin bootable.Both hda.

My bios boot order is: cd,hd0,-,-.I just tried first boot hd1(2006) and I see the selection screen and I tried to boot linux and it would not boot.Switched to my nice custom splash screen(I think thats what its called) and just did nothing.maybe this is what I need to do now using hdb6(2006) for the ?


Quote:
Any operating system becomes "chainloadable" if it has a boot loader inside its root partition. To put a boot loader inside its partition in Linux you type

lilo -b /dev/hda? for Lilo and
grub-install /dev/hda? for Grub where hda? is the root partition (replace ? with a number to suit your case)

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

To chainloading in Lilo's lilo.conf just add 2 lines (repated here for completeness)

other=/dev/hda?
Label=Linux
I'm sorry for my mix up and thank you.

Last edited by MRDucks; 12-01-2005 at 11:01 PM.
 
Old 12-02-2005, 02:35 AM   #68
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53
Quote:
I did not install mand2005 on hdb5(I wanted it on hdb).I installed it on hda5,6,7 zin being hda1 and hda7
Now you say

Quote:
As of now I still have mand2005 and zin bootable.Both hda
Good cristal clear to us now.

This thread is going wild

Quote:
If I do this: then you add these 2 lines to Mand2005le's /etc/lilo.conf
other=/dev/hda6
label=Mand2006

Will this still work?
I do not think so. This is lilo syntax and you have installed grub.
You are mixing uo kitchen towels and bath sheets here.

Log in mandy 2005 LE
Start a terminal as root
cp /boot/grub/menu.lst /boot/grub/menu.lst.old
kedit /boot/grub/menu.lst &

Add to the file
title Mandy06on_hdb1_viachainloader
root (hd1,0)
chainloader +1

(remember we count from 0 here, so partition 1 is referenced as 0 in grub)
(and hd1 is b, hd0 is a, ok?)

You can also duplicate the entry that is there for Mandy05
and edit it then so it points to hdb and to the right kernerl version / file
or it could look nearly like (you may need to change hdb1 to hdbx)

title Mandy06on_hdb1_viakernel_location
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hdb1 splash=silent initrd /boot/initrd

Instead of vmlinuz you could give the exact name of the kernel file if you fancied
 
Old 12-02-2005, 08:09 AM   #69
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
This thread is going wild
Its not the thread its me
I am pretty well versed in the diff.in lilo&grub hd/part. labeling through all this

That was my idea last night to edit the grub conf/menu to point to mandy2006 hd1.(I dont really care about 2005 at this point)I do have an enormous amount of time in 2006.Installing things manually is a huge stumbling block for me(not obvious yet?)and I had everything installed on 2006 and updated on 2006.

Now evidently I am too stupid to find the grub menu to edit it.I looked for 2 hrs last night.The above commands returned a bash:no file found.

When I find it I'm going to aim the linux entry at 2006 and leave things well enough alone until I learn a little more.

Thanks for the info.

and yes I think saikee's tutorial is excellent.I just wish I had given my proper info to start with.I'm sure I'd have 3 os's up and running now if I had.

Last edited by MRDucks; 12-02-2005 at 08:26 AM.
 
Old 12-02-2005, 08:14 AM   #70
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53
you were tired and forgot to do in 2005le
su to be superuser

or you mispelt /boot/grub/menu.lst LST not 1st ?

or you did not install kedit, try kwrite or vim
kwrite /boot/grub/menu.lst

or it is not there...
 
Old 12-02-2005, 08:40 AM   #71
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Best way to look for it is

ls / to find /boot, then
ls /boot to find /boot/grub and finally
ls /boot/grub to see if is menu.lst there

I usually type

vi /boot/grub/menu.lst

Should be 1 minute job and I would spend the 2 hours on watching TV instead.
 
Old 12-02-2005, 08:43 AM   #72
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Rep: Reputation: 53
or install the locate package from mandy

then as root type
updatedb

then
locate grub | grep menu

If it does not work, well then it is not there at all
 
Old 12-03-2005, 12:05 AM   #73
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
Ok I have found some things out using the gui.I will post the replies I got from the terminal commands you gave me At the bottom of this post.
I installed the only locate pkg I found in file names using the pkg installer and updatebd.I did the easyurpmi/update thing last night since it looks like I'll be keeping 2005 around for a while.
I am logged in as a root user(red screen w/the warning about easily screwing things up).I had to do this in 2006 using gedit to edit the lilo.conf. file to suite me.If I dont the editors will show me a read only file and not let me change it.

There is no" /boot/grub/menu" or "/boot/grub/menu.lst ' in my file system.Or should I say there is no /menu file in /boot/grub/ using the "find file" gui tool or manually browsing for it.There is 15 grub files when I look in /boot/grub.It starts with iso9660_stage1_5 then list what appear to be all file systems including fat_stage1_5 then starts stage2_eltorito.There are 2 files I can open to view.The rest (file icon=big green foot on paper sheet) say no installed viewer can open this file type.I found a /boot/perl/menu file.Is this helpful?
When I "kwrite /boot/grub/menu.lst" or "kwrite /boot/grub/menu" Kwrite opens a blank page.

I found the lilo.conf file the other night and changed its hda partition values to the correct hdb values for 2006,"saved as" replacing the original file,ran "lilo" from term,restarted and same thing.I did this using other values several times(I have no idea what the original was now) before I realized I wasnt booting from this file anymore.

The command "vi /boot/grub/menu.lst" returns this:

~
~
~
~
"/boot/grub/menu.lst" [New File] 0,0-1 All

At this stage of my knowledge I kinda wish I had lilo for a bootloader.And the fact that when I was editing the file I had to try 3 times before I got it right.lilo would not let me enter the changes until I got it right.I think thats what I need.A "semi-safe for newbies to edit" booter.
My only question from saikee"s one post chainloading tutorial would be-when I was trying to add 2006 to the lilo.conf file both name=linux.lilo would not accept 2 same name.but I will get to this when it comes about.
If I werent so inclined to fix things I would have formatted and started over days ago.If it were win I would have but I think linux is worth fixing.Being an auto mechanic I have the dreaded "Dont go new.Fix the old" disease.I hope you can make some sense out of the following term outputs.
Thanks.(I know this is the wrong forum but if you have any auto ? feel free)

[root@24-151-242-242 ~]# /boot/grub/menu.lst
bash: /boot/grub/menu.lst: No such file or directory
[root@24-151-242-242 ~]# locate grub | grep menu
[root@24-151-242-242 ~]#
[root@24-151-242-242 ~]# ls / to find /boot
ls: to: No such file or directory
ls: find: No such file or directory
/:
bin/ dev/ home/ lib/ opt/ root/ sys/ usr/ xorg.conf
boot/ etc/ initrd/ mnt/ proc/ sbin/ tmp/ var/

/boot:
boot.0300 initrd.img@ message-text
boot.0341 kernel.h@ System.map@
config@ kernel.h-2.6.11-6mdk System.map-2.6.11-6mdk
config-2.6.11-6mdk map us.klt
grub/ message@ vmlinuz@
initrd-2.6.11-6mdk.img message-graphic vmlinuz-2.6.11-6mdk
[root@24-151-242-242 ~]# ls /boot to find /boot/grub
ls: to: No such file or directory
ls: find: No such file or directory
/boot:
boot.0300 initrd.img@ message-text
boot.0341 kernel.h@ System.map@
config@ kernel.h-2.6.11-6mdk System.map-2.6.11-6mdk
config-2.6.11-6mdk map us.klt
grub/ message@ vmlinuz@
initrd-2.6.11-6mdk.img message-graphic vmlinuz-2.6.11-6mdk

/boot/grub:
default ffs_stage1_5 reiserfs_stage1_5 ufs2_stage1_5
device.map iso9660_stage1_5 stage1 vstafs_stage1_5
e2fs_stage1_5 jfs_stage1_5 stage2 xfs_stage1_5
fat_stage1_5 minix_stage1_5 stage2_eltorito
[root@24-151-242-242 ~]# ls /boot/grub to see if is menu.lst
ls: to: No such file or directory
ls: see: No such file or directory
ls: if: No such file or directory
ls: is: No such file or directory
ls: menu.lst: No such file or directory
/boot/grub:
default ffs_stage1_5 reiserfs_stage1_5 ufs2_stage1_5
device.map iso9660_stage1_5 stage1 vstafs_stage1_5
e2fs_stage1_5 jfs_stage1_5 stage2 xfs_stage1_5
fat_stage1_5 minix_stage1_5 stage2_eltorito
[root@24-151-242-242 ~]#
 
Old 12-03-2005, 05:54 AM   #74
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
May be someone hasn't told the automechanic but we don't usually see a autobox (Grub) fitted togethere with a manual box (Lilo) in a car. One is enough. Though greedy bastard like me may have them both.

The automechanic should fix the manual box rather than find a place to pour the fluid into a torque convertor.

Lilo distinguishs each system by its name as stated in the "label=" statement. So please use

label=Mand2006

The original name "Linux" can also be changed as long as you alter the "default" statement too. The default statement tells Lilo which system to boot if it gets tired of waiting for the automechanic to make up his mind.

Any characters can be put after the "label=" but Lilo is known to be fussy with a fixed field doesn't like special characters. It always tells its owner if there is anything wrong when the owner does a revaidation (type "lilo" at BASH shell) after carrying alteration to lilo.conf

Got a feeling the automechanic is about to test drive the vehicle he has been fixing for a while.
------------------------------
I know some automechanics can improvise by using the girl friend's stocking as a substitute for a broken fan belt. These mechanic can write their own lilo,conf and menu.lst too in a PC. I only managed to try only one of the two.

Last edited by saikee; 12-04-2005 at 02:37 PM.
 
Old 12-04-2005, 02:22 PM   #75
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
I'm so silly.I'm embarrassed to tell you what I did.
I woke yesterday not knowing LQ site was down to make changes.after trying to login and getting a not authorized to view msg.I thought I'd been banned from LQ for being silly so.....
The auto mechanic thought long and hard and concluded his problems started when installed 2005 and that he was trying to patch a tire on an auto with a blown motor.(after installing lilo/grub everywhere)

Quote:
I know some autimechanics can improvise by using the girl friend's stocking as a substitute for a broken fan belt. These mechanic can write their own lilo,conf and menu.lst too in a PC. I only managed to try only one of the two.
After finding the printout of the original lilo.conf for his 2os,2hd system I did a cable swap to 2006,re-wrote lilo.conf,swap,delete 2005,reconnected,locked box(for good hopefully) and I'm up and running!

I think I'm going to enjoy linux for awhile before I jump into a tsunami not knowing how to swim again.I am making extra partitions for future use so I'm sure I'll be back.

Thanks for all the help and great info.

By the way saikee I have tried both now and to date only the pc has worked.To think all the good fan belts I ruined and still had to walk home!
 
  


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
Lost Linux boot and boot floppy doesn't work marquedios Linux - Newbie 9 05-22-2005 03:21 PM
Creating a Boot Floppy for Dual Boot Setup? jdanniel Linux - Newbie 8 08-07-2004 03:08 PM
Cannot Boot Linux - forgot to make boot floppy marsial Linux - Newbie 3 08-23-2003 01:39 PM
Floppy disk fail to boot when install suse 8 with boot from floppy ffang Linux - Newbie 0 08-18-2003 09:44 PM
Can boot from floppy, would like to boot from Hard Drive Mike32940 Linux - Newbie 5 02-08-2003 12:43 PM


All times are GMT -5. The time now is 05:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration