LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2003, 02:32 AM   #16
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985

not offering to help i'm afraid... but if you don't know much QT, now's a great time to not bother learning anymore... http://gtk.org
 
Old 07-22-2003, 04:45 AM   #17
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
Well, I know more QT than gtk... But thanks for the tip. I've already started working! Wish me luck. Soon I'll post some screen shots!
 
Old 07-22-2003, 05:19 AM   #18
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
Ok. Let's review... Here are the suggested features:

-back up boot sector
dd if=/dev/hdaX of=/file/to/write bs=512 count=1
//is this right?

-back up partition table
//no idea

-copy drive to drive
dd if=/dev/hdaX of=/dev/hdaY
//does it work if drives are not equal?

-write zeros to boot sector
dd if=/dev/zero of=/dev/hdaX bs=512 count=1

-write random 9 times to drive
{
for(i=0;i<9;i++)
dd if=/dev/random of=/dev/hdaX bs=1M
}

-create iso cdrom image
dd if=/dev/cdrom of=/iso.image

-burn cdrom image (?)
//i don't think this is necessary, because it's cdrecord's job!

-create floppy disk image
dd if=/dev/fd0 of=/file/to/write

-write floppy disk image
dd if=/file/to/write of=/dev/fd0

Now, if you spotted some errors or have suggestions about the commands, please post them! Also, if you want new features, please come up with suggestions!

browny_amiga, great suggestion about the disclaimer! There will be a window that pops up when the user starts informing him about how he can screw up his system!
For now, the disclaimer will be:
Code:
"xdd" is a powerful programm. It's improper use can bomb your harddisk (100%
sure non-recoverable), bomb your floppies, bomb your OS, bomb your MBR. If you
don't know what dd does or you are unsure why you are using this tool, better
don't. You might loose your data and a lot of hair with it."
acid kewpie suggested that xdd should "automatically detect partition types, device types,filesystem formats and the likes" . I have no idea how to do that! Any input is accepted!

"check for available space before copying" ... I think I can do that!
 
Old 07-22-2003, 08:05 AM   #19
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
I've done some work and here's the result.. It's just the gui, it doesn't do anything yet.. Let me know if you like it and if you find it 'user friendly' (note, there will be explicit tool tips in the final version!)

Here's the link
http://www.geocities.com/mad_ady/linux/xdd.html

Notes: I'll have to change the if and of comboboxes with something that will allow the user to type in something! Any suggestions are welcome!
 
Old 07-23-2003, 01:20 AM   #20
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
sorry that my suggestions are inside your quote,
but hopefully you'll see them.
i've been unusually busy the past week, but i'll try
to get some more suggestions soon.

you can also backup a partition (filesystem) to a file, and
compress it dd if=/dev/hdaX |gzip > filename.dd.gz
it will compress much better if you zero out the free
space first with dd if=/dev/zero of=/filename/on/mounted/
drive.zero. it doesn't really matter whether you delete
the file or not for the compression purposes

you can restore the partition (filesystem) on a partition
that is as big or bigger than the original.
dd if=filename.dd.gz | gzip -cd > dev/hdaX


Quote:
Originally posted by mad_ady
Ok. Let's review... Here are the suggested features:

-back up boot sector
dd if=/dev/hdaX of=/file/to/write bs=512 count=1
//is this right?

-back up partition table
//no idea

the partition table is in the master boot record. like
dd if=/dev/hda of=/file/to/write bs=512 count=1



-copy drive to drive
dd if=/dev/hdaX of=/dev/hdaY
//does it work if drives are not equal?
if the second drive is bigger. you mean hdX and hdY right?


-write zeros to boot sector
dd if=/dev/zero of=/dev/hdaX bs=512 count=1

-write random 9 times to drive
{
for(i=0;i<9;i++)
dd if=/dev/random of=/dev/hdaX bs=1M
}

if you write random to a filename instead, you can
cover up files you just deleted, and make recovery
unlikely. you could also use this for a test of a hard
drive to see if all of the drive is writable.
a couple of options you may with to look at are
ofbs and ifbs. thats blocksize for infile and outfile.
just bs sets both ofbs and ifbs.
besides that, i've done tests for speed, and bs=1M
was way faster than taking the default size. and when
the block sizes don't come out right even, a partial
block will be written, so it doesn't hurt anything. best
i know anyway. you could have a drop down bs=
menu, and everybody could test the speed differences.

-create iso cdrom image
dd if=/dev/cdrom of=/iso.image

-burn cdrom image (?)
//i don't think this is necessary, because it's cdrecord's job!

-create floppy disk image
dd if=/dev/fd0 of=/file/to/write

-write floppy disk image
dd if=/file/to/write of=/dev/fd0

Now, if you spotted some errors or have suggestions about the commands, please post them! Also, if you want new features, please come up with suggestions!

browny_amiga, great suggestion about the disclaimer! There will be a window that pops up when the user starts informing him about how he can screw up his system!
For now, the disclaimer will be:
Code:
"xdd" is a powerful programm. It's improper use can bomb your harddisk (100%
sure non-recoverable), bomb your floppies, bomb your OS, bomb your MBR. If you
don't know what dd does or you are unsure why you are using this tool, better
don't. You might loose your data and a lot of hair with it."
acid kewpie suggested that xdd should "automatically detect partition types, device types,filesystem formats and the likes" . I have no idea how to do that! Any input is accepted!

"check for available space before copying" ... I think I can do that!

Last edited by whansard; 07-23-2003 at 01:32 AM.
 
Old 07-23-2003, 01:57 AM   #21
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
autodetection - examine /proc/ide and such like.... simple enough.
 
Old 07-23-2003, 04:22 AM   #22
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
Thanks for the suggestion, acid_kewpie.
whansard, those are good ideas, but I don't understand how that command zeros unused space... It seems to me that it zeros the whole partition!
 
Old 07-23-2003, 03:52 PM   #23
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
Quote:
Originally posted by mad_ady
Thanks for the suggestion, acid_kewpie.
whansard, those are good ideas, but I don't understand how that command zeros unused space... It seems to me that it zeros the whole partition!


dd if=/dev/zero of=/dev/hda1 zeros first partition first drive
dd if=/dev/zero of=/dev/hda zeros first drive
dd if=/dev/zero of=filename creates a file of zeros

if you make that file on a mounted filesystem, the file
will be created up to the size of the free space on the
drive. it will not overwrite any existing files, and the
previously deleted files are fully overwritten. that way
somebody can't just use a disk editor and parse your
empty space for data. if you made a file called
mycreditcardnumber.txt, and then deleted it, the data is
still on the harddrive until overwritten. thats what the
zeroing is for. the same is true for the passwd file.
this is more useful for a fat or fat32 drive in my opinion.
let's say you've been looking at porn in windows and
you don't want somebody to be able to come in with
an undelete utility, and recover your browser cache.
 
Old 07-24-2003, 02:06 AM   #24
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
I understand now... Thanks for the explanation! It's a good idea!

Any suggestions on saving/restoring partition table(s)?
 
Old 07-24-2003, 03:41 AM   #25
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
the partition table is in the master boot record. like
dd if=/dev/hda of=/file/to/write bs=512 count=1
 
Old 07-24-2003, 05:49 AM   #26
Vlad_M
Member
 
Registered: Aug 2002
Location: Cape Town, South Africa
Distribution: Red Hat 8.0 (Home), Red Hat 8.0 (Work)
Posts: 388

Rep: Reputation: 30
Quote:
Originally posted by acid_kewpie
not offering to help i'm afraid... but if you don't know much QT, now's a great time to not bother learning anymore... http://gtk.org
Why is GTK better than QT?
 
Old 07-24-2003, 09:50 AM   #27
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
Ok guys, don't start a QT/GTK flame war over here...
whansard, thank you for that... I suppose restauration goes about the same way... I'll try them out... Naturally, not on my system, but on a vmware machine!

Here are the facts so far... I'd say the program is about 40% operational... Unfortunatelly I ran into some problems... I can't seem to find the itoa (integer to ascii) function that existed in ol' C... It should have been in stdlib.h, but it's not! Where can I find it, or how can I convert an integer to char or QString?

Anyway, I've started a new project on sourceforge.net. It's called dd-frontend (all the good names were taken ). I hope they validate my reqest by tomorrow, because I'm going away on a vacantion (I don't know for how long...) and I won't have time to deal with this...

If you can't find the dd-frontend project on sourceforge, you can download the source (in its current state) from http://www.geocities.com/mad_ady/linux/xdd.tar.gz

Anyone is free to continue my work (note, however, that I'm not giving up yet, I'm just taking a well deserved vacantion!)
 
Old 07-25-2003, 02:55 AM   #28
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
OK, it's done. We have a project on sourceforge.net
Just go to https://sourceforge.net/projects/dd-frontend/
If you want to be a member (to code, make web page, write help), let me know (and send me your sourceforge user name).

I've uploaded the latest cvs, but it may take a while for the page to update it...

Any words of encouragement? Browny_amiga? anywone?
 
Old 07-25-2003, 03:07 AM   #29
Vlad_M
Member
 
Registered: Aug 2002
Location: Cape Town, South Africa
Distribution: Red Hat 8.0 (Home), Red Hat 8.0 (Work)
Posts: 388

Rep: Reputation: 30
Quote:
Originally posted by mad_ady
Ok guys, don't start a QT/GTK flame war over here...
Who is starting a flame war? I asked a question.
 
Old 07-25-2003, 03:45 AM   #30
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally posted by Vlad_M
Why is GTK better than QT?
because *I* use it ...
 
  


Reply



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
Cross-Platform GUI Frontend for MySQL chandru.in Linux - Software 2 08-10-2005 07:13 AM
need good GUI/frontend for Xmame on suse 9.3 fireedo SUSE / openSUSE 5 06-28-2005 05:44 AM
GUI frontend for gphoto2 trigggl Slackware 5 12-19-2004 12:44 PM
Is there a Shorewall GUI frontend? eroica Linux - Security 5 03-11-2004 11:26 AM
a good gui frontend for antivirus program jayakrishnan Linux - Software 0 10-05-2002 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration