SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209
Rep:
Slackware 9.1, dd is not working
Dear all.
I just upgraded my box from Slackware 9.0 to 9.1,
but this command does not work anymore.
dd if=/dev/zero of=root_fs bs=1M seek=100
It creates a very big file until no more space left on the harddisk.
I checked it, dd belongs to fileutils package on 9.0 but belongs to coreutils-5.0 on 9.1.
I have upgraded coreutils to 5.2.1, but the problem remains.
Could somebody confirm this ?
And it would be great if you give hints for the solution.
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153
Rep:
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.....
-crash
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..........
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.