[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: booting a debootstraped filesystem?



On Sat, 7 Jun 2003, Andreas Metzler wrote:
> Henning Moll <newsScott@gmx.de> wrote:
> > I used a debootstraped/chrooted sarge filesystem to build a
> > binary-deb package, which i also installed there (also under
> > chroot). Now i want test(execute) that package. For that purpose i
> > think of booting that filesystem.
> Isn't enough for you to run sshd in the chroot amd login with it?
Hmm... in just cases, it would be sufficient to just do:

[/mnt/grunt/chroot]# chroot .
kilobyte:/# su - kilobyte
kilobyte@kilobyte:~$
 
> > I know how to use debootstrap/chroot to setup a debian system on
> > _another_ partition. But how to go if root of the debootstraped file
> > hirachy is not the root of the partitions filesystem?
> > Any suggestions?
> The only thing that comes to my mind is using an initrd and doing the
> mount && chroot from there. I cannot give any details, this is just an
> idea.
What about this:
[/mnt/grunt/chroot]# tar cf - *|(cd /mnt/grunt;tar xvf -)
Tar will preserve all the special devices, fifos, symbolic links and 
permissions (I'm not sure about hard links).  AFAIK mc can do that as 
well, and it would allow you to move files instead of copying them.
You can then simply type "root=/dev/hda7" at the lilo prompt, at least if 
your kernel is non-modular.

I'm not sure if anything relies on hard links being kept linked, but I've 
already used tar to migrate a root filesystem twice and haven't _noticed_ 
any problems.

1KB
/-----------------------\ Shh, be vewy, vewy quiet,
| kilobyte@mimuw.edu.pl | I'm hunting wuntime ewwows!
\-----------------------/
Segmentation fault (core dumped)



Reply to: