On Fri, 2006-05-05 at 18:16 +0100, Martin Feeney wrote:
> Declan Moriarty wrote:
>> > I am concluding that the correct way forward is not to get brave with
> > fdisk, as it obviously is making no sense of things. You mount /dev/sda,
> > not sda1; /dev/sdx1 and upwards don't exist on either drive according to
> > mount. One has to take the figures above with a large dose of
> > imagination anyhow. df and du are consistent about the space.
>> Well, if you're mounting /dev/sda, then there's no point looking at the
> partition table - it'll be the first few bytes of the fs interpreted as
> a partition table, and understandably rubbish.
>> What might be an idea would be to:
>> dd if=/dev/sda of=backup.img
>> The make a dos fs on /dev/sda (mkfs -t vfat or mksf.vfat) and hope for
> the best. You can always dd the backup back onto the device if it
> doesn't work.
>> The output of the dd (backup.img) should be the actual size of the raw
> disk, so you'll be able to verify some of the figures. You can always
> make a copy of the backup and loop mount it to mess about without
> destroying the filesystem on the device.
>> > The 256k units never showed more than 245k free. I believe some firmware
> > is in the ram chip also, and hiding above (or below) the ramdisk. If I
> > partition or format, I lose the firmware. The solution may be in finding
> > a way to reinstall the firmware, or in cross-installing firmware (256M
> > into 1G)
>> That sounds like an unbelievably stupid hack if it's true.
>
Agreed on the hack. Dosfsck was good.
It found both FATs. I went through saying "No" to writes and tried each
one. FAT2 had 215M unused clusters and several things would be
truncated. FAT1 only found 15M of lost clusters.
So I'm taking the image with dd as suggested. 'rm -f *' in linux freed
up all the 256M in a 256Meg disk, but that is not a worry as the thing
was reduced to usb disk functionality anyhow. I don't want to get too
heroic with the lost clusters. It's the lost space I am worried about.
I'll post again on the morrow with success/failure.
--
With Best Regards,
Declan Moriarty.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!