[Netkit.users] Re: Resize Netkit filesystem
Julien Bisconti
julien.bisconti a student.fundp.ac.be
Sab 2 Dic 2006 18:24:55 CET
Dear Massimo,
Massimo Rimondini wrote:
> Dear Julien (I had to dig around to find your name; hope I got it right! :)
> ),
>
You got my name right, don't worry about it.
> thank you very much for providing the complete procedure. We will consider
> it for inclusion in the next release (which, by the way, is also very likely
> to address the up-to-dateness of currently available tools).
>
No problem, I'm glad to help you, you are doing a great job !! You can't
imagine how much time I saved thanks to your Netkit.
By the way, I forgot to put in my previous mail a tip :
In case you have an error "E: Dynamic MMap ran out of room" after an
"apt-get install", you should add this
APT::Cache-Limit "10000000";
to your /etc/apt/apt.conf . If the problem persists, just increase the
number :
APT::Cache-Limit "20000000";
SOURCE: http://www.yak.net/fqa/416.html
Another thing, if you have problem to unmount the Netkit filesystem
after installing/launching few programs, it's because programs are still
running on this filesystem. With chroot, you share the same process
table, you can check it if you enter the command "ps -ef" (into the
chrooted environment or into your host), you will see the process
running on your own host AND the chrooted environment !
The question is "How can I know which process belongs to my host and
those who don't?".
Just install the program (if it's not already done): lsof.
% lsof /mnt/loop
Or wherever you mouted your Netkit filesystem.
Then, you have to kill them one by one. But maybe someone can make a
simple script to do so. ;-)
> Probably your e-mail didn't make it because you have subscribed with a
> different address (julien.bisconti at student.fundp.ac.be).
>
I should have known, it's the main problem with alias mail. You don't
even remember which one is the alias!!
Take care and keep it on!
Best,
Julien.
> Best,
> Massimo.
>
>
>> -----Original Message-----
>> From: jbiscont at student.fundp.ac.be
>> [mailto:jbiscont at student.fundp.ac.be]
>> Sent: Thursday, November 30, 2006 10:54 AM
>> To: contact at netkit.org
>> Subject: Resize Netkit filesystem
>>
>> Hi,
>>
>> I tried to send this email to the mailling list, but it never
>> made it. So I think you could add this into your man page.
>>
>> Thank you
>>
>>
>> ----- Forwarded message from jbiscont at student.fundp.ac.be -----
>> Date: Tue, 28 Nov 2006 19:18:54 +0100 (MET)
>> From: jbiscont at student.fundp.ac.be
>> Reply-To: jbiscont at student.fundp.ac.be
>> Subject: Resize Netkit filesystem
>> To: netkit.users at list.dia.uniroma3.it
>>
>> Hi,
>>
>> Just to let you know that it's possible to resize the Netkit
>> filesystem, I didn't find any documentation/man page that
>> tell me how to do it. And I needed more space and more
>> up-to-date programs! For instance, Quagga instead of Zebra,
>> iproute2, iptables, ebtables, netcat, and so on.
>>
>> * Every command must be executed on the host!
>> * You may need the root right to mount a file to a loop device
>> * Please, make a backup of your file, we never know!
>>
>> CHECKING FILESYSTEM CONSISTENCY (OPTIONAL)
>> ------------------------------------------
>> # Attach the filesystem to a loop device (must be loaded into
>> the kernel, see "man netkit-filesystem") % losetup -o 16384
>> /dev/loop0 $NETKIT_HOME/fs/netkit-fs-F2.2
>>
>> # Check if the filesystem is consistent
>> % e2fsck -f /dev/loop0
>>
>> # Detach from loop device
>> % losetup -d /dev/loop0
>>
>>
>> RESIZING FILESYSTEM
>> --------------------
>>
>> # Replace "newsize" by the size you want dd if=/dev/zero of=
>> $NETKIT_HOME/fs/netkit-fs-F2.2 bs=1 count=1 seek="newsize"
>> conv=notrunc
>>
>> # Attach the filesystem to a loop device % losetup -o 16384
>> /dev/loop0 $NETKIT_HOME/fs/netkit-fs-F2.2
>>
>> # Resize the filesystem
>> % resize2fs -p /dev/loop0
>>
>> # Check if the filesystem is consistent
>> % e2fsck -f /dev/loop0
>>
>> # Detach from loop device
>> % losetup -d /dev/loop0
>>
>> Done.
>>
>>
>> SOURCE : http://user-mode-linux.sourceforge.net/resize.html
>>
>>
>> HOW TO INSTALL NEW SOFTWARE:
>> ----------------------------
>>
>>
>> Once you managed to resize your filesystem, just mount the file :
>>
>> % mount -o loop,offset=16384 $NETKIT_HOME/fs/netkit-fs-F2.2 /mnt/loop
>>
>> Mount proc if you intend to install a software
>>
>> % mount -t proc proc /mnt/loop/proc
>>
>> If you need to access to your physical device, you can bind them:
>>
>> % mount -o bind /dev /mnt/loop/dev
>>
>> If you need to access to the Internet, copy you resolv.conf file:
>>
>> % cp /etc/resolv.conf /mnt/loop/etc/resolv.conf
>>
>> And then, you can chroot into the file system:
>>
>> % chroot /mnt/loop/ /bin/bash
>>
>> When you are to the chrooted environement, set your profile :
>>
>> %% source /etc/profile
>> %% source /root/.bashrc
>>
>> By the way, I think the "/usr/local/sbin:/usr/sbin:/sbin:" is
>> not in the PATH variable. You may want to add it.
>>
>> Then you can modify your /etc/apt/sources.list to have the
>> mirror you want.
>> Upgrade everything!
>>
>> %% apt-get update && apt-get upgrade
>>
>> Enjoy!
>>
>> ----- End forwarded message -----
>>
>>
>
>
>
--
--------------------------------------------
Julien BISCONTI <julien.bisconti at student.fundp.ac.be>
M.Sc. student in Computer Science, University of Namur
FUNDP, Belgium
GSM BELGIQUE: +32 474 598 418
GSM ESPAŅA: +34 671 168 458
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dia.uniroma3.it/mailman/private/netkit.users/attachments/20061202/20e05ff1/attachment.htm
Maggiori informazioni sulla lista
Netkit.users