How to change the a block size on a flush usb disk ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How to change the a block size on a flush usb disk ?
After my mp3 player stopped playing music,
I would like to use it as a flush usb disk.
I would like to make it bootable.
I can see the device in WinXP and in Linux ,
but I can't access it with GRUB.
GRUB simply does not see it.
I think the cause of the problem is the block size on the flush disk,
which is 2048 (bytes ?) .
I looked for info on how to format the player,
but nothing I found worked.
Gparted and QTparted did not agree to do anything with it,
and I need some assistance with fdisk/cfdisk/sfdisk .
The current block size on the player is 2048,
but I think Linux would prefer it to be 512 or 1024 .
Can anybody explain the logic behind having 512 or 1024 block size ?
following is a redirection of fdisk -l :
Note: sector size is 2048 (not 512)
Disk /dev/sda: 998 MB, 998506496 bytes
Units = cylinders of 1922 * 2048 = 3936256 bytes
Disk identifier: 0x6f20736b
I was able to redirect the fdisk -l output only by using
my resident installation of Debian single user mode.
I could not redirect the fdisk -l output with Knoppix or with Puppy.
does anybody know why ?
The block size is not an issue. FLASH uses either a 2k or 4k block size.
The block size is simply the minimum size block that can be written to the device.
Smaller writes must be faked by reading the block, updating it, then writing it back.
Your FLASH should appear as a SCSI drive, Its /dev/sda in your fdisk output above.
grub installs its bootloader into the space before the first partition, which on an mp3 player, may be the player firmware, so you may need some special commands to overwrite that. If you do that, it may not work at all, even as as USB stick any more.
Grub should have no problems attempting the grub install. What errors do you see ?
I doubt grub (classic) will deal with the sector size being other than 512. Been ages since I looked at the code though.
There is also the possibility the device has an HPA that could be upsetting things as well.
If it were me I'd just dd zeroes over the start of the device - fdisk should then open it and create a partition table. But you'd better not want any of the data on it, and it may just destroy it all together as a working/usable device.
I tried the zeroes over the mbr with dd ,
I ran the command:
sudo dd if=/dev/zero of=/dev/sda bs=512 count=1
The command ran fine.
I then looked back into the player and nothing changed on it.
The partitions are still there, and the data is still there.
And yes, I am sure the player is sda .
And no, I didn't ruin any other partition on any other
drive on the computer.
Does it mean that I reached the end of the way ?
Does it mean the mbr on the player can not be erased ?
My knowledge of the dd command and of linux in general,
is not that big (which is why I post in the newbie forum).
I understand there is no point in running the dd command
with any block size, unless I have the MBR unlocking code
Well, I don't have that code.
In fact, I have no idea what that code is.
Can you enlighten me on this issue ?
Is that code supposed to be supplied by the manufacturer
of the mp3 player ?
Could it be that that the MBR area of the flush memory
is not writable at all ?
The unlocking code will be that of the FLASH memory itself. Its determined by the FLASH memory chip designer.
It also has to be written to the right addresses with the right timing. For embedded devices, like mp3 players, which have a 'fixed' program for the player and writable space for your music, the MBR and the mp3 player code may be locked into the device before its put in its case. It may not be possible to unlock it over USB.
You can still use the device as a data storage device but you need to rewrite the MBR to make it bootable
My problem is not formating partitions on the player.
The problem I have is in making the Player bootable.
And I just learned from NeddySeagoon that in my particular
case it is not possible.
Thank you for your response.
With my knowledge of electronics I know
the mbr can be "burned" on a non-rewritable part of the memory,
but I didn't know if that's how they make it on MP3 players.
What you explained is what I suspected.
For me this is the end of the story. I will not be able
to boot it.