Attention Paul - Formatting question


C

casey.o

Paul

I know you said you have used PcLinuxOs 2009. I now have 2 flash drives
and 2 HDDs to format, which could be infected. Once that is dont,
everything will be cleaned up. I know I can format the HDDs using a Dos
boot floppy, (but will have to throw the floppy away, just to be safe).
But I cant format the flash drives from a dos boot.

I just spend almost 2 hours trying to figure out how to format drives
while booted to the Live Cd of PcLinuxOs. I dont know where they hide
the format command, because I cant find it. Do you know how?

The easiest solution would be to just format both HDDs and both flash
drives from a Linux Cd boot and be done with it. I wont lose much data,
except some drivers that I can download again. This way I wont need to
burn any CDs to boot XP.

Thanks
 
Ad

Advertisements

C

casey.o

If the ISO you want to use is hosted on the Internet, go
to your nearest public library and use their computer to
burn a CD. I think I've burned a CD at our public library.
Just take a half dozen CD-Rs with you (a buck each or less),
in case the computers are ancient. If you were in another
country, I'd say "go to an Internet cafe", but I don't even
know if we have those here or not. I've not looked.

Paul

Our library wont allow anything inserted in their computers. I needed
to print a simple text file on a floppy and they said no. Their reason
was because of viruses. That's ok, I'll just toss the flash drives in
the garbage and be done witth it. Even if there was a place to make
CDs, by the time I waste several boxes of CDs, I can buy new flash
drives, while wasting a lot less time and stress. And consideing no CD
has ever worked for me. I wont even consider it.
 
P

Paul

Paul

I know you said you have used PcLinuxOs 2009. I now have 2 flash drives
and 2 HDDs to format, which could be infected. Once that is dont,
everything will be cleaned up. I know I can format the HDDs using a Dos
boot floppy, (but will have to throw the floppy away, just to be safe).
But I cant format the flash drives from a dos boot.

I just spend almost 2 hours trying to figure out how to format drives
while booted to the Live Cd of PcLinuxOs. I dont know where they hide
the format command, because I cant find it. Do you know how?

The easiest solution would be to just format both HDDs and both flash
drives from a Linux Cd boot and be done with it. I wont lose much data,
except some drivers that I can download again. This way I wont need to
burn any CDs to boot XP.

Thanks

If the ISO you want to use is hosted on the Internet, go
to your nearest public library and use their computer to
burn a CD. I think I've burned a CD at our public library.
Just take a half dozen CD-Rs with you (a buck each or less),
in case the computers are ancient. If you were in another
country, I'd say "go to an Internet cafe", but I don't even
know if we have those here or not. I've not looked.

Paul
 
P

Paul

Paul

I know you said you have used PcLinuxOs 2009. I now have 2 flash drives
and 2 HDDs to format, which could be infected. Once that is dont,
everything will be cleaned up. I know I can format the HDDs using a Dos
boot floppy, (but will have to throw the floppy away, just to be safe).
But I cant format the flash drives from a dos boot.

I just spend almost 2 hours trying to figure out how to format drives
while booted to the Live Cd of PcLinuxOs. I dont know where they hide
the format command, because I cant find it. Do you know how?

The easiest solution would be to just format both HDDs and both flash
drives from a Linux Cd boot and be done with it. I wont lose much data,
except some drivers that I can download again. This way I wont need to
burn any CDs to boot XP.

Thanks

Open a terminal and in there enter

su root
password: root

Now the command prompt will turn red, and you're
running as Administrator.

hwinfo --short --disk

That will give the name(s) of hard drives.
The name shown is a pointer to the entire drive,
such as /dev/sda.

hwinfo --disk

That one gives a lot more (confusing) information.
It would include size information or a model number
or whatever. That way, you can distinguish the
purpose of /dev/sda versus /dev/sdb or /dev/hda or
/dev/hdb.

You can remove the MBR on a drive like this. Here
I identified /dev/sda as the drive I want to erase
the partitions on. Removing the MBR just removes
all information about the (MBR-based) partitions.
A GPT disk might require more than this for all
I know. Your disk(s) aren't likely to be GPT.

dd if=/dev/zero of=/dev/sda bs=512 count=1

That overwrites the first sector of the disk, the MBR.

*******

If it is a hard drive, you can overwrite the
entire drive (without consulting the drive size)
like this.

dd if=/dev/zero of=/dev/sda

That zeros the entire drive, stopping only when you
run out of hard drive to erase. Hard drives don't
wear as such, so it doesn't matter how "efficient"
my command parameters are.

If the device was flash, I'd try to be a little more
gentle. Say the flash drive was ~2GB. I would use a
block size of 2 megabytes (could be stated 2M perhaps
or 2097152 if you want to spell it out precisely).
I always use exact numbers, because I confuse easily.
The arithmetic product of those two numbers, is 2GiB.

( http://en.wikipedia.org/wiki/GiB )

dd if=/dev/zero of=/dev/sda bs=2097152 count=1024

If the command bitched that the block size was too large,
I'd chop it down a notch like this.

dd if=/dev/zero of=/dev/sda bs=1048576 count=2048

That would be sufficient to erase my 2147483648 or
2GiB flash key. The large block size, is intended
to write full flash pages if possible, and perhaps
not require as many writes to a flash page.

I'd try to get the total number of sectors
for hard drive. My sample drive, the value was
33554304 sectors of 512 bytes each. I would factor
that, into "reasonable" values.

On a hard drive, a smaller block size might be
a reasonable (performance) choice. I can factor the
33554304 number, using the factor program. (By passing
numbers to the "dd" command, it runs roughly three times
faster with the usage of a decent block size.)

factor 33554304

The answer returned includes

2 2 2 2 2 2 2 3

Multiply those together gives 384. Multiply that number
of sectors by 512 to get 196608 bytes. Divide 33554304 by 384
to get the block count of 87381.

dd if=/dev/zero of=/dev/sda bs=196608 count=87381

That erases all 196608 * 87381 = 17,179,803,648 or
17GB or so of the hard drive.

I tried looking in the PCLinuxOS menus for a better
way, but none came to mind.

So if it is a hard drive, this is easier than all
that gibberish.

dd if=/dev/zero of=/dev/sda

If it is a flash key, you can try your hand at
crafting a numeric format of the command.

dd if=/dev/zero of=/dev/sdb bs=1048576 count=2048

Flash keys can be formatted with an MBR present
in sector zero, or without an MBR at all. Erasing
the whole thing is just the easiest way to be sure
that nothing remains.

*******

If the hard drive has an HPA or host protected area,
more gibberish is required. There's no point
worrying about that now, as the HPA won't bite you
on the ass, unless something modifies it. Like
the BIOS has some option to multiplex five partitions
into a four partition MBR. And only a few OEM computers
do stuff like that. So we won't worry about HPA right now.
(The assumption here would be, the "evil" seller of
the computer, places malware inside the HPA, as a
future "bomb" if the HPA area is ever accessed somehow.
The malware normally couldn't get there all by itself,
as HPAs are a bear to work with. It takes considerable
work, to load something in there, an effort. And not
worth it, unless you "hate" the buyer.)

To satisfy yourself an HPA is not present (without using
the appropriate Linux command), simply compare the
size info from hwinfo --disk, to the size on the label of
the hard drive. If there is a significant difference between
the label value, and the hwinfo --disk value, then go off
and do some research on HPA. I have both added and removed
an HPA on my current computer, but I'm not prepared
at the moment to give a recipe. This is enough dribble
for now.

HTH,
Paul
 
P

Paul

Our library wont allow anything inserted in their computers. I needed
to print a simple text file on a floppy and they said no. Their reason
was because of viruses. That's ok, I'll just toss the flash drives in
the garbage and be done witth it. Even if there was a place to make
CDs, by the time I waste several boxes of CDs, I can buy new flash
drives, while wasting a lot less time and stress. And consideing no CD
has ever worked for me. I wont even consider it.

Our library solves this problem, by using a technology that
effectively treats the Windows drive as read-only. When the
OS is running, effectively just delta info is kept. Windows
is fooled into thinking it is updating the hard drive, when it is not.
When the library client ends their session on the machine, the
machine reboots, and *nothing* is left from the client's
session. It disappears. If you take your Sality USB key
there, and plug it in, Sality thinks it has modified a
couple hundred EXE files, but after a reboot (when the
next client comes along), all those changes are lost.
Internet Cafe operators also use this technique.

A consequence of plugging in the Sality-infected key,
is the machine will likely run a bit slow. So if an
infection vector is present, it could disable the machine
to such a point, that a reboot is required by the person
using the computer.

Microsoft made a free version of this kind of software,
but Internet Cafes will use a commercially written version.
Such a software product needs support, to account for
issues that might arise in real usage. Like if a malware
is written to specifically attack such a system. I suppose
someone making a botnet, would like to add all the
public libraries they could find :)

http://en.wikipedia.org/wiki/Windows_SteadyState

Paul
 
B

Bob F

Paul

I know you said you have used PcLinuxOs 2009. I now have 2 flash
drives and 2 HDDs to format, which could be infected. Once that is
dont, everything will be cleaned up. I know I can format the HDDs
using a Dos boot floppy, (but will have to throw the floppy away,
just to be safe). But I cant format the flash drives from a dos boot.

I just spend almost 2 hours trying to figure out how to format drives
while booted to the Live Cd of PcLinuxOs. I dont know where they hide
the format command, because I cant find it. Do you know how?

The easiest solution would be to just format both HDDs and both flash
drives from a Linux Cd boot and be done with it. I wont lose much
data, except some drivers that I can download again. This way I wont
need to burn any CDs to boot XP.

Is there really any risk from formatting a drive? As long as you don't allow
anything on the drive to execute, the formatting process, I would think, would
eliminate any virus risk. Am I wrong?
 
Ad

Advertisements

P

Paul

Bob said:
Is there really any risk from formatting a drive? As long as you don't allow
anything on the drive to execute, the formatting process, I would think, would
eliminate any virus risk. Am I wrong?

http://www.urbandictionary.com/define.php?term=nuke it from orbit

"I say we take off and nuke the entire site from orbit.
It's the only way to be sure."

I'm with Ripley on this :) Nuking it from orbit just feels right.

While normally, removing the MBR in a fraction of a second
would be enough, I'd feel better making sure there is
absolutely nothing left behind.

Paul
 
J

John Dulak

Paul

I know you said you have used PcLinuxOs 2009. I now have 2 flash drives
and 2 HDDs to format, which could be infected. Once that is dont,
everything will be cleaned up. I know I can format the HDDs using a Dos
boot floppy, (but will have to throw the floppy away, just to be safe).
But I cant format the flash drives from a dos boot.

I just spend almost 2 hours trying to figure out how to format drives
while booted to the Live Cd of PcLinuxOs. I dont know where they hide
the format command, because I cant find it. Do you know how?

The easiest solution would be to just format both HDDs and both flash
drives from a Linux Cd boot and be done with it. I wont lose much data,
except some drivers that I can download again. This way I wont need to
burn any CDs to boot XP.

Thanks

Casey O:

If you boot DOS from a device your MB allows you to boot from you CAN
get access to USB *storage* devices from DOS, you just have to load
the right drivers. Kind of like having to load drivers to access a
CD-ROM drive from DOS or Windows 3.xx

In CONFIG.SYS

device=USBASPI.SYS /w /v
device=DI1000DD.SYS

USBASPI.SYS is available in the self extracting archive
"kxlrw40an.exe" at:
http://panasonic.jp/com/support/drive/archive/driver/kxlrw40an.exe
The /w switch pauses and displays a bessage to connect a USB device.
The /v switch displays verbose messages.

DI1000DD.SYS is available in the archive "mhairu.zip" at:
http://www.stefan2000.com/darkehorse/PC/DOS/Drivers/USB/mhairu.zip

I found these several years ago and have used it with DOS boot
floppies and CDs. Very handy to have access to stuff from DOS. Also
handy to have is NTFS4DOS This will allow you to read and write to
NTFS drives from DOS.

http://avira-ntfs4dos-personal.avira-gmbh.qarchive.org/

HTH & GL

John

--
\\\||///
------------------o000----(o)(o)----000o----------------
----------------------------()--------------------------
'' Madness takes its toll - Please have exact change. ''

John Dulak - 40.4888ºN,79.899ºW - http://tinyurl.com/3lvoh2n
 
Ad

Advertisements

K

Ken Springer

Our library wont allow anything inserted in their computers. I needed
to print a simple text file on a floppy and they said no. Their reason
was because of viruses. That's ok, I'll just toss the flash drives in
the garbage and be done witth it. Even if there was a place to make
CDs, by the time I waste several boxes of CDs, I can buy new flash
drives, while wasting a lot less time and stress. And consideing no CD
has ever worked for me. I wont even consider it.

Do you know anyone with a Mac? If so, you can format the flash drives
there. Sality doesn't infect OS X.

And if you know someone who has a Mac, or someone who has a Windows box,
you could download Gparted, http://gparted.sourceforge.net/, burn the
Live CD for you, and then run the Live CD on your computer and format
whatever you wanted.

In the past, when faced with the kind of dilemma you have, I've used
Gparted to first format a drive a couple of times using different Linux
file systems, then formatted it with NTFS. Never had a reason to do FAT
32. I've also taken those drives, plugged them into my Mac, and first
formatted as OS X, one or more of the various flavors.


--
Ken
Mac OS X 10.8.5
Firefox 25.0
Thunderbird 24.3.0
"My brain is like lightning, a quick flash
and it's gone!"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top