SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
dd if=/dev/zero of=root_fs bs=1M seek=100
This command reads from /dev/zero, outputs to root_fs (in the current directory), but skips the first 100*1M in /dev/zero, all with a blocksize of 1M, until it reaches end-of-file. But _unfortunately_, there is no end of file for /dev/zero, because it's supposed to output an infinite amount of zeroes. That's why dd happily outputs zeroes to root_fs, and not stop until no more space is left on the mounted filesystem on which the root_fs resides.
To make it stop at a certain time, use the 'count' option. For example:
this may be a dumb question, but why would you want to do this? i understand why you would need dd working, but why fill all remaining space with zeroes? my only thought is that it has something to do with swap space.....
Originally posted by Crashbox this may be a dumb question, but why would you want to do this? i understand why you would need dd working, but why fill all remaining space with zeroes? my only thought is that it has something to do with swap space.....
The way I read Kocil's post is he only wants to zero out the file "root_fs", not zero out all the free space on the disk................this is a recommended procedure for making your own initrd image for a bootable rescue disk, after which you create an ext2 filesystem on it and mount it to a loop device to add the needed kernel image and files for booting..........