"Jose Orlando T. Ribeiro" <[EMAIL PROTECTED]> wrote:
> 
> I hadn�t expressed myself correctly!!

Ah - ok.  No problem!

> What I did: removed the CD-ROM and changed the HD, so it didn't boot up... Now
> I undestood waht you said... I had to put a small HD in the place of the CD-ROM 
> and don�t make any changes... right?

Short answer - no, you want to put the small hd in place of /dev/hdb, so that lilo
can still boot there (giving you a bootable linux - see next paragraph).

The whole point of this mess is to 

1 - ensure that you always have a bootable linux partition no matter what.
2 - boot that linux partition so you can set up the moved drive to boot again.


In other (longer ;-) words, the idea is to make it so you can boot linux 
somehow, mount '/' from /dev/hdc1 (on e.g. /mnt/hdc1), chroot to there 
(chroot /mnt/hdc1), fix up /etc/lilo.conf, install lilo, fix up /etc/fstab 
(e.g. /mnt/hdc1/etc/fstab) to point to the right device (again, /dev/hdc), 
and then reboot using the  newly-re-configured lilo.  (Carefully rebooting
so that you've left the chroot and unmounted everything so you don't have
to fsck - oh, wait - you're using reiser.  Never mind about that ;-)

> The drive where I have enough free space for a backup is my /dev/hda... it's a
> 40G IDE.

Oh, shoot - that makes it even easier.  Install (or otherwise put) a minimal
linux on there (even linux on fat should work), set up lilo to boot THAT
linux ONLY (you will lose big time if you don't fix lilo (or grub) before moving that
/dev/hdb to /dev/hdc!), and use that linux to do that paragraph that starts
with 'In other (longer ;-) words'.

It should also be possible to boot the install CD and do all this.

> About boot floppies... can I make a boot floppy and edit the fstab in the floppy
> disk?

Depends upon how you install onto the floppy.

If you put lilo onto the floppy, then you've got one situation, if you install
a raw boot image you've got another situation.

In the case of lilo on the floppy (a kinda cool thing, actually), you can set it up
to allow you to choose /dev/hda1, /dev/hda2, /dev/hdb1, etc, as well as the floppy
image(s) of linux on that floppy.  (Yes, it works, I've done it ;-)

I think 'make bzdisk' from your linux source tree will make the raw boot image
version without lilo.   This is a fine way to make a simple recovery disk for
when you have the drive installed as /dev/hdb, but its a bit weak for when
you have it elsewhere.

And you STILL want to be able to boot linux first, so you can fix your /etc/fstab
and /etc/lilo.conf


>  I even tried to do this, but when I do "cd /mnt/floppy" there is an error
> message like "couldn't read media"... it�s because /mnt/floppy uses the ms-dos
> file system mount??? How to mount and read a lilo boot floppy??

Well, you may or may not need to do this.  lilo goes on the MBR (sector 0,
cylinder 0, track 0) of the floppy.  What is on the rest of the floppy could
be nothing, msdos fat filesystem, ext2, whatever.  

So, if its fat, then you need to mount -t fat or -t vfat, if its ext2
then mount -t ext2 (assuming supermount is not in there messing you up),
etc.

Usually you won't need to mount it though - if you have built your kernel
then do a make bzdisk there in the kernel source tree.  (with a unused floppy
in there!).  This makes a disk that boots directly onto the root partition
you currently have set (which COULD be a chrooted place!).

> And that message :
> 
> > > ========== begin error message =========================
> > >
> > > VFS Can not open root device "341" or 03:41
> > > Please append a correct "root" boot option
> > >
> > > ============ end error message =========================
> 
> what is that "root device "341" or 03:41" ??? I don't have any reference in
> fstab or lilo.conf to a device 341...

Oh, its some strange mapped code that I've only figured out once.  Its ALMOST
like device major/minor type in /dev files, but not quite.  Basically it
means /dev/hdb1 ain't there any more (or some other partition)

But then, you knew that ;-)

And I've forgotten where I saw the instructions on how to figure out
what they meant, sorry.

> Sorry if I'm not very clear, I'm Brazilian and sometimes my English is faulty
> :-)

Shoot - your english is better than mine!

rc


Rusty Carruth          Email:     [EMAIL PROTECTED] or [EMAIL PROTECTED]
Voice: (480) 345-3621  SnailMail: Schlumberger ATE
FAX:   (480) 345-8793             7855 S. River Parkway, Suite 116
Ham: N7IKQ @ 146.82+,pl 162.2     Tempe, AZ 85284-1825
ICBM: 33 20' 44"N   111 53' 47"W

Reply via email to