LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re: Can Linux solve a windows problem?

[ILUG] Re: Can Linux solve a windows problem?

Marcus Furlong furlongm at hotmail.com
Fri May 5 17:55:34 IST 2006


Declan Moriarty wrote:

> On Fri, 2006-05-05 at 16:57 +0100, Kae Verens wrote:
>> Declan Moriarty wrote:
>> > Windows XP seems to take the biscuit for messing things up. Latest is a
>> > usb disk/mp3 player - a poor kid's ipod. It has a gig, a lcd screen,
>> > will record, store mp3s and play. Windows apparently overwrote the
>> > early directories. I have heard bad things about formatting these, as
>> > you lose functionality.
>> > 
>> >  It shows
>> > [dec at genius ~]$ df /media/usbdisk
>> > Filesystem           1K-blocks      Used Available Use% Mounted on
>> > /dev/sda               1000032    210928    789104  22% /media/usbdisk
>> 
>> 
>> you should be able to clear it using "fdisk /dev/sda" - put a vfat
>> partition on it.
> 
> That got very interesting:
> 
> Now the dodgy disk reads like this:
> 
> Command (m for help): p
> 
> Disk /dev/sda: 1024 MB, 1024311808 bytes
> 32 heads, 62 sectors/track, 1008 cylinders
> Units = cylinders of 1984 * 512 = 1015808 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   ?      942426     1027451    84344761   69  Unknown
> Partition 1 has different physical/logical beginnings (non-Linux?):
>      phys=(68, 13, 10) logical=(942425, 2, 42)
> Partition 1 has different physical/logical endings:
>      phys=(288, 115, 43) logical=(1027450, 1, 25)
> Partition 1 does not end on cylinder boundary.
> /dev/sda2   ?      857621     1800102   934940732+  73  Unknown
> Partition 2 has different physical/logical beginnings (non-Linux?):
>      phys=(371, 114, 37) logical=(857620, 22, 38)
> Partition 2 has different physical/logical endings:
>      phys=(366, 32, 33) logical=(1800101, 9, 4)
> Partition 2 does not end on cylinder boundary.
> /dev/sda3   ?           2           2           0   74  Unknown
> Partition 3 has different physical/logical beginnings (non-Linux?):
>      phys=(371, 114, 37) logical=(1, 9, 32)
> Partition 3 has different physical/logical endings:
>      phys=(372, 97, 50) logical=(1, 9, 31)
> Partition 3 does not end on cylinder boundary.
> /dev/sda4               1     1731408  1717556736    0  Empty
> Partition 4 has different physical/logical beginnings (non-Linux?):
>      phys=(0, 0, 0) logical=(0, 0, 1)
> Partition 4 has different physical/logical endings:
>      phys=(0, 0, 0) logical=(1731407, 31, 62)
> Partition 4 does not end on cylinder boundary.
> 
> Partition table entries are not in disk order(end of fdisk o/p)
> 
> 
> The good disks read very similarly.
> Disk /dev/sdb: 257 MB, 257802752 bytes
> 8 heads, 62 sectors/track, 1015 cylinders
> Units = cylinders of 496 * 512 = 253952 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1   ?     1568823     3870254   570754815+  72  Unknown
> Partition 1 has different physical/logical beginnings (non-Linux?):
>      phys=(357, 116, 40) logical=(1568822, 3, 11)
> Partition 1 has different physical/logical endings:
>      phys=(357, 32, 45) logical=(3870253, 0, 51)
> Partition 1 does not end on cylinder boundary.
> /dev/sdb2   ?      340100     4243383   968014120   65  Novell Netware
> 386
> Partition 2 has different physical/logical beginnings (non-Linux?):
>      phys=(288, 115, 43) logical=(340099, 6, 47)
> Partition 2 has different physical/logical endings:
>      phys=(367, 114, 50) logical=(4243382, 4, 42)
> Partition 2 does not end on cylinder boundary.
> /dev/sdb3   ?     3769923     7673205   968014096   79  Unknown
> Partition 3 has different physical/logical beginnings (non-Linux?):
>      phys=(366, 32, 33) logical=(3769922, 2, 30)
> Partition 3 has different physical/logical endings:
>      phys=(357, 32, 43) logical=(7673204, 7, 39)
> Partition 3 does not end on cylinder boundary.
> /dev/sdb4   ?           1     7333118  1818613248    d  Unknown
> Partition 4 has different physical/logical beginnings (non-Linux?):
>      phys=(372, 97, 50) logical=(0, 0, 1)
> Partition 4 has different physical/logical endings:
>      phys=(0, 10, 0) logical=(7333117, 7, 30)
> Partition 4 does not end on cylinder boundary.
> 
> Partition table entries are not in disk order(end of fdisk o/p)
> 
> 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.

Yeah, it's using the entire disk rather than partitions, so there is no
partition table, but fdisk still tries to read from where it should be. You
can create one by deleting all those entries and adding new ones. Or just
recreate the filesystem on the entire disk.

> 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)

Honestly I don't think so, I've formatted lots of these things and they all
work fine afterwards. Anyway to be safe, you could you backup the entire
thing using dd, then have at it with strings and then hexedit to see
whereabouts the firmware is located.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell