Why can't I install GRUB on my mp3 player ?
Why can't I install GRUB on my mp3 player ?
I am using my mp3 player as a usb disk. It is 1GB in volume. I store files on it. I would like to install GRUB on it and boot from it. The label on it says its communication standard is USB 2.0 . I checked the mp3 player’s properties on Win XP and it says the file system is FAT. I created "boot" and "grub" folders on it, and copied the GRUB files into it. I can write to the mp3 player with Windows XP and with Debian GNOME, but I can't write to it with Knoppix (live CD) and GRUB ! I can’t save the changes I make with GRUB or Knoppix. The Win XP and Debian are installed on the H.D. There is no operating system on the player. I unmounted it and then remounted it again with the command: "sudo mount -t vfat -w /dev/sda1 /media/usbdisk" but it didn’t help. When on Debian, I am able to activate the GRUB I copied to it, and perform the command “root (hd1,0)”, but I get the message: “filesystem type unknown, partition type0x6” . I also performed the command "geometry (hd1,0)” and got the message : “drive 0x81: C/H/S=1172/32/52, The number of sectors=1950208, /dev/sdb Partition num:0, filesystem type unknown, Partition type 0x6 “ I also tried the above with other disks and partitions, Like (hd1), (hd1,1), (hd0,0) etc’ just to make sure I am not missing the correct partition, but nothing worked. I wonder if it is possible to activate GRUB from WinXP ? Since WinXP detects the player's file system without any problem. I installed GRUB on two other thumbdrives, and booted from them Without any problem. They where both “SunDisk Cruzer Micro“, one of them was formatted with FAT and the other with FAT32, and I tried it on two completely different computers, one is a “HP” PC at work, and the other is a “Asus” mobo At home. I searched for info on the net and I found some issues about Mp3 players that are not detected by the BIOS or the operating system and I was ready to give up, but what drives me crazy is that everything is ok with BIOS, operating system, etc’. The player is detected and I can write to it with the operating system. The only problem is when I try to install GRUB on it! I performed the command ”lsusb –v > {filename}” on it and here is the result : Bus 002 Device 003: ID 066f:8000 SigmaTel, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x066f SigmaTel, Inc. idProduct 0x8000 bcdDevice 10.01 iManufacturer 1 iProduct 2 iSerial 3 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 4 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Bus 002 Device 002: ID 045e:0083 Microsoft Corp. Basic Optical Mouse Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x045e Microsoft Corp. idProduct 0x0083 Basic Optical Mouse bcdDevice 0.00 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Devices bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 52 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 10 Bus 002 Device 001: ID 0000:0000 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed hub bMaxPacketSize0 64 idVendor 0x0000 idProduct 0x0000 bcdDevice 2.06 iManufacturer 3 iProduct 2 iSerial 1 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 255 Bus 001 Device 001: ID 0000:0000 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 1 Single TT bMaxPacketSize0 64 idVendor 0x0000 idProduct 0x0000 bcdDevice 2.06 iManufacturer 3 iProduct 2 iSerial 1 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 12 Any help appreciated, Baby peng |
How about posting:
Code:
fdisk -l |
a printout of my "fdisk -l"
Here is the result of the command "fdisk -l" on my computer:
====================== Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 3212 25793747+ 7 HPFS/NTFS /dev/hda2 3213 4486 10233405 83 Linux /dev/hda3 4487 4865 3044317+ 82 Linux swap / Solaris Note: sector size is 2048 (not 512) Disk /dev/sdb: 998 MB, 998506496 bytes 32 heads, 52 sectors/track, 293 cylinders Units = cylinders of 1664 * 2048 = 3407872 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 293 975000 6 FAT16 Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 0, 52) logical=(0, 1, 1) ====================== It's the 1st time I look at fdisk -l printout, so I don't exactly know what I am seeing, but it seems ok, no ? My mps player is there, it has a certain size and it has a filesystem which is FAT16. Am I correct ? And thank you for your help and time. Babypeng |
OK, how about trying the following as root user:
Code:
mount /dev/sdb1 /mnt Code:
gedit /mnt/boot/grub/menu.lst & Code:
# menu.lst - See: grub(8), info grub, update-grub(8) |
Well, it didn't work.
I performed rhese 2 commands: mount /dev/sdb1 /mnt grub-install --root-directory=/mnt --recheck /dev/sdb The "mount" command went OK and I was able to view the content of the mp3 player. The "grub-install" command didn't work. It gave the message: "You should not call /sbin/grub-install. Please call /usr/sbin/grub-install instead ! Probing devices to guess bios drives. This may take a long time. The file /mnt/boot/grub/stage1 not read correctly." I then navigated to the place where the stage1 file should be, and it was there. Any help appreciated. Babypeng |
From which distro did you run the grub-install command? Did you try doing what the error suggested and use the grub-install command from the /usr/sbin/ directory instead? If you haven't tried that, try doing:
Code:
mount /dev/sdb1 /mnt Code:
cp /usr/lib/grub/*/* /mnt/boot/grub |
I thought about doing what you just told me,
but I didn't have enough confidence/courage. I was afraid that it might not install grub on the player, but somewhere else, and perhaps run over the mbr. I also looked at the content of the file device.map on /mnt/boot/grub and it had a list of 3 devices: (fd0),(hda),(sdb) while the device.map on /boot/grub had just a single entry: (hda) I will look at /usr/sbin/ and see what I find there. I will definitely try what you told me. Thank you so much for your help. Babypeng |
Oops, I forgot,
The distro's I am using the grub from is either: 1. A Debian which is installed on a HD partition, and I boot to it with grub from a pendrive (the pendrive is not mine). 2. Knoppix DVD Babypeng |
I did it from /usr/sbin/grub-install --root......
and it STILL didn't work. It gave hte message: "Probing devices to guess bios drives. This may take a long time. The file /mnt/boot/grub/stage1 not read correctly." This is some kind of advance because it didn't say anything about not running GRUB from /usr/sbin . But why is it not reading the stage1 file ? I used Windows and copied it again to the same location, but it still coud not be read. BabyPeng |
OK, how about posting the output of the all following commands:
Code:
mount /dev/sdb1 /mnt |
Hello CJS,
Here are the outputs of every code line you asked me to run: mount /dev/sdb1 /mnt -> there wasn't any output here. The command just ran ok, and I actually accessed the content of the MP3 player thru /mnt . mkdir -p /mnt/boot/grub -> There wasn't any out put here. The folders were created and I accessed them. I don't understand the need for this command because these folders were already there. I created them when I tried to install GRUB to the player. But I ran this command anyway. cp /usr/lib/grub/*/* /mnt/boot/grub -> No output here either. The command just ran ok. grub -> GRUB was activated. grub> root (hd1,0) -> After this command the out was: "File system type unknown, partition type 0x6" grub> setup (hd1) -> Here the output was: "Error 17: cannot mount selected partition" grub> quit -> Here GRUB closed. I don't understand why can't GRUB mount the partition. Debian is able to mount the partition and I can access it and read whatever is in there, but I can't write to it. Thank you so much for your help, BabyPeng |
So you ran the Grub commands as root user, true? If so, then it looks like Grub can't mount the sdb1 partition; that is not a total surprise since fdisk previously reported that:
Quote:
Another option would be to try and install Grub4DOS to it instead as I previously mentioned; Grub4DOS generally has better NTFS/FAT support than legacy Grub. If you want to try that, how about posting: Code:
fdisk -lu |
Hello CJS,
> So you ran the Grub commands as root user, true? Yes. It is true. I logged into the Debian installation as root, and performed the commands. Following are redirections of the outputs of the command you asked me to run. ======================== The command "fdisk -lu" : (please notice that the 2002MB disk marked as /dev/sda is the usb stick I booted from. This disk is not the issue. The issue is the 998MB sdb disk). Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 63 51587557 25793747+ 7 HPFS/NTFS /dev/hda2 51600780 72067589 10233405 83 Linux /dev/hda3 72067590 78156224 3044317+ 82 Linux swap / Solaris Note: sector size is 2048 (not 512) Disk /dev/sdb: 998 MB, 998506496 bytes 32 heads, 52 sectors/track, 293 cylinders, total 487552 sectors Units = sectors of 1 * 2048 = 2048 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 52 487551 975000 6 FAT16 Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 0, 52) logical=(0, 1, 1) Disk /dev/sda: 2002 MB, 2002255360 bytes 4 heads, 16 sectors/track, 61103 cylinders, total 3910655 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sda1 * 16 3910654 1955319+ e W95 FAT16 (LBA) ======================= The command "hexdump -C -n 2048 /dev/sdb" : 00000000 fa eb 1d 21 53 22 69 23 67 24 6d 25 61 26 54 27 |...!S"i#g$m%a&T'| 00000010 65 28 6c 29 2c 2a 49 2b 6e 2c 63 2d 32 30 30 35 |e(l),*I+n,c-2005| 00000020 33 c0 bc 00 7c 8e d0 fb cd 18 eb fe 30 39 31 33 |3...|.......0913| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001b0 00 00 00 00 00 00 00 00 75 c6 65 e2 00 00 80 00 |........u.e.....| 000001c0 34 00 06 1f 74 24 34 00 00 00 4c 70 07 00 00 00 |4...t$4...Lp....| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000800 ====================== I will try grub4dos . I downloaded it and I will read some tutorial about it. Thank you for your help, Babypeng |
Hello CJS,
Just to let you know, I tried grub4dos, it's a nice thing. I installed it on few pendrives and booted WinXP from them with no problem. I tried it on few computers. I also tried to install it on my mp3player and it didn't work. I guess my mp3 player is a hopeless case. The installation offered me the option "--skip-mbr-test" and I used it, but it didn't boot. Thank you for your help. babypeng |
Babypeng, how did you try to install Grub4DOS to your mp3 player? If you used their own installer and it failed, I think a better option would be to try and use "dd" to copy the Grub4DOS MBR to your mp3 player. In other words, if you navigate to the Grub4DOS-0.4.4 directory where the "grldr.mbr" file is, you could do:
Code:
dd if=grldr.mbr of=/dev/sdb bs=440 count=1 |
All times are GMT -5. The time now is 09:59 PM. |