LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 12-21-2008, 08:27 AM   #1
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Rep: Reputation: 15
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
 
Old 12-21-2008, 09:32 AM   #2
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
How about posting:
Code:
fdisk -l
Also, since you can access the mp3 player in Windows, you could maybe instead install "Grub4DOS" to the drive and use that, and also the "Grubinst" package to make it easy to install the Grub4DOS MBR to the drive. What errors do you get in Linux when you try to write to the drive?
 
Old 12-22-2008, 01:44 AM   #3
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 12-22-2008, 08:27 AM   #4
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, how about trying the following as root user:
Code:
mount /dev/sdb1 /mnt
grub-install --root-directory=/mnt --recheck /dev/sdb
If that works, then do:
Code:
gedit /mnt/boot/grub/menu.lst &
And copy/paste the following into the menu.lst document:
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

default		0
timeout		5

title Boot From 2nd HDD
rootnoverify (hd1)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
Save, reboot, set your BIOS to boot the mp3 player, and let me know what happens. We can work from there.
 
Old 12-31-2008, 07:49 AM   #5
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 12-31-2008, 09:15 AM   #6
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
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
/usr/sbin/grub-install --root-directory=/mnt --recheck /dev/sdb
And see if that makes any difference. If not, you could instead do the following (while sdb1 is still mounted on /mnt):
Code:
cp /usr/lib/grub/*/* /mnt/boot/grub
grub
grub> root (hd1,0)
grub> setup (hd1)
grub> quit
And see if that works. If not, please post the output of all the above commands and we can work from there.
 
Old 12-31-2008, 02:48 PM   #7
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 12-31-2008, 02:51 PM   #8
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-01-2009, 09:45 AM   #9
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-01-2009, 10:58 AM   #10
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, how about posting the output of the all following commands:
Code:
mount /dev/sdb1 /mnt
mkdir -p /mnt/boot/grub
cp /usr/lib/grub/*/* /mnt/boot/grub
grub
grub> root (hd1,0)
grub> setup (hd1)
grub> quit
 
Old 01-06-2009, 01:44 AM   #11
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-06-2009, 05:56 AM   #12
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
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:
Code:
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)
I suppose you could try deleting your present FAT partition on the mp3 player with gparted, and then use gparted to create a new FAT partition to replace it; if that works, then probably Grub will be able to mount the partition. But it might be that doing so could cause the mp3 player to not recognize its own partition, and then you wouldn't be able to use it as an mp3 player after that. But if you are just using the mp3 player to store files, then it probably wouldn't be a problem.

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
hexdump -C -n 2048 /dev/sdb
I just want to check the MBR and first few sectors of the mp3 player drive to make sure it looks like we could install Grub4DOS to its MBR, and also make sure the sdb1 partition has enough free space in front of it to install the Grub4DOS MBR. I would recommend that we try Grub4DOS before you reformat the mp3 player with a new partition, but let me know what you want to do.

Last edited by CJS; 01-06-2009 at 05:58 AM.
 
Old 01-08-2009, 08:41 AM   #13
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-29-2009, 01:51 AM   #14
babypeng
Member
 
Registered: Nov 2007
Distribution: Puppy
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-29-2009, 08:32 AM   #15
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
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
dd if=grldr.mbr of=/dev/sdb skip=1 seek=1
That should install the Grub4DOS MBR to your sdb mp3 player. Then you just need to put the "grldr" and "menu.lst" files in the sdb1 partition, and see if it boots. If you decide to give it a try, let me know how it goes.

Last edited by CJS; 01-29-2009 at 08:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get and install a decent MP3 player for red hat? martinr Linux - Software 16 09-06-2006 04:28 PM
Install a distro to USB HD/MP3 player? ferentix Linux - General 2 04-02-2006 03:34 AM
Trying to install bmp mp3 player, getting glib error dangerousdave Linux - Newbie 1 02-12-2005 09:46 PM
Install MP3 player futurist Linux - Software 4 03-19-2003 12:44 AM
mp3 player install probs & ktlib noodlesUK Linux - Software 2 10-25-2001 02:43 PM


All times are GMT -5. The time now is 02:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration