Skip to Content.
Sympa Menu

baslinux - Re: [BL] fs.img size choice?

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] fs.img size choice?
  • Date: Sun, 21 Mar 2004 10:21:07 +1200

James Miller wrote:
>
> For the scenario I was talking about - using BL2
> ramdisk to do this

If you are using BL2, you need to do: insmod loop
That is not needed in BL3.

> - you'd need to create 2 mount points for the
> fs.img filesystems,

Or, if you were doing it from inside BL3, you would
need just one mount point.

> let's say one at /mnt/fs-old and the other at /mnt/fs-new

Or you could use existing mountpoints, like: /mnt /tmp

> Then, you do
> mount -o loop fs-old.img /mnt/fs-old
> mount -o loop fs-new.img /mnt/fs-new.
> cp -a /mnt/fs-old /mnt/fs-new

That should be: cp -a /mnt/fs-old/* /mnt/fs-new

> Or use tar to do this

Or use send/receive. Just cd to the top of fs-new and
execute: receive. Then start another tty, cd to the top
of fs-old and execute: send. Use localhost for the
hostname and * for the file to send.

> I guess if one were trying to do this under BL3, one
> would need to do only mount -o loop fs-new.img /mnt/fs-new

or simply use /mnt

> and then simply issue cp -a /* /mnt/fs-new

Sorry, it's not that easy.

> (making sure one has unmounted any floppies or CD's or
> other HD's that one may have mounted first).

In BL3, your DOS drive is mounted. It is impossible to
umount it because it holds the current root filesystem.
So, if you do cp -a *, it will include your entire DOS
partition. It will also include the contents of /proc
(a rather large chunk of kernel workspace).

In the HD installation scripts for BL1 and BL2 (which
copied the currently-running filesystem to a new partition),
the directories were copied one by one: /bin /dev /etc /lib
/root /sbin /usr /var. Then mkdir was used to create the
mountpoints and /proc.

> Please offer any corrections needed to this potential faq

I don't plan on doing a FAQ for this, I'd rather do a script.
Even with step-by-step instructions, there are too many ways
for a newbie to get it wrong and cause a real mess.

Cheers,
Steven







Archive powered by MHonArc 2.6.24.

Top of Page