LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-22-2004, 04:17 AM   #1
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Rep: Reputation: 31
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.

Thank you very much.
 
Old 06-22-2004, 04:32 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,436

Rep: Reputation: 93
did you try the 'conv=notrunc' option ?
 
Old 06-22-2004, 08:26 AM   #3
wpyh
Member
 
Registered: Jun 2004
Location: Beijing
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153

Rep: Reputation: 35
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:

dd if=/dev/zero of=1M_file bs=1024 count=1024

Try it
 
Old 06-22-2004, 03:07 PM   #4
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Original Poster
Rep: Reputation: 31
Oops ...
I made mistake. Count is the keyword.
My reference said
dd if=/dev/zero of=1M_file bs=1M count=1 seek=100

I missed the count, but your example is better.

Thank you very much wpyh.
 
Old 06-22-2004, 08:19 PM   #5
wpyh
Member
 
Registered: Jun 2004
Location: Beijing
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153

Rep: Reputation: 35


Btw, ketemu lagi di info... :P I guess this forum is english-only :P
 
Old 06-23-2004, 01:54 PM   #6
Crashbox
Member
 
Registered: Jun 2004
Location: USA
Distribution: Slackware
Posts: 136

Rep: Reputation: 21
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
 
Old 06-23-2004, 04:25 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,972
Blog Entries: 11

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
For instance to create a crypto-loop device? :)


Cheers,
Tink
 
Old 06-23-2004, 07:42 PM   #8
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Quote:
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..........
 
Old 06-23-2004, 09:55 PM   #9
Crashbox
Member
 
Registered: Jun 2004
Location: USA
Distribution: Slackware
Posts: 136

Rep: Reputation: 21
tink & geek...thanks for the knowledge....now i need to do some research to figure out what a crypto-loop device is for.......
 
Old 06-24-2004, 02:16 PM   #10
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Start with this: Linux Encryption HOWTO

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CD Drives not working in Slackware 9.1 jon1591 Linux - Hardware 10 01-01-2005 12:07 PM
Sound not working in Slackware 9.1 rsamurti Slackware - Installation 6 12-19-2003 07:51 PM
slackware 9.1 - X not working mastershake Slackware 4 12-03-2003 04:19 AM
wine and winesetuptk working well with slackware 9.0 and slackware 9.1 oobe Linux - Software 0 10-19-2003 12:29 PM
Slackware 9.1 - Not Working Out egh128 Slackware 3 10-02-2003 01:58 AM


All times are GMT -5. The time now is 01:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration