Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running into a little problem that I need an explanation for. I have 2 memory sticks. When I boot while the first one is inserted, I get the message 'invalid system disk'. If I boot while the second one is in, this does not happen and the system boots to the OS on the HD. Both don't have the bootable flag set as shown below.
Neither of them has ever contained an OS.
Can somebody explain.
Code:
Disk /dev/sdb: 4127 MB, 4127195136 bytes
16 heads, 32 sectors/track, 15744 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk identifier: 0xbf164fee
Device Boot Start End Blocks Id System
/dev/sdb1 1 15744 4030448 c W95 FAT32 (LBA)
Code:
Disk /dev/sdb: 1024 MB, 1024966656 bytes
32 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 992 999813+ 6 FAT16
1. I would definitely set the "bootable" flag (even though it sounds like your PC's BIOS doesn't happen to need it).
2. There's a remote possibility the problem is in the USB stick.
3. It's likelier, however, that maybe the one stick simply doesn't have a valid MBR. Why not do a "dd" and then "bdiff" the first 512 bytes from both sticks.
If they're not identical, then do another "dd" and copy the "good" MBR over to the stick that doesn't boot.
By all means - please post back and let us know what you find.
ad 1)
Any reason for that if you don't want to boot from the memory stick?
ad 3)
I zeroed the mbr using dd and tried again. The problem persisted ('invalid system disk') but what was really scary was that Ubuntu did no longer automount it. I forgot to check dmesg to see what was going on as I got a bit of a fright, but was glad that I made a backup first so I could restore that.
Later today, I will try to put the mbr of the 'good' memory stick on the misbehaving one. Further this needs some more research with regards to the automount (and specifically what actually is in the mbr).
ps command used to zero the mbr:
Code:
dd if=/dev/zero of=/dev/sdb bs=512 count=1
WimS
EDIT:
OK better to just zero 446 bytes so one does not overwrite the partition table
Last edited by Wim Sturkenboom; 07-16-2009 at 10:18 AM.
Reason: Added the edit
I'm still unclear exactly what the problem is...
... but since you just want data...
... and since the system seems to be finding (at least) the device...
... then why don't you just reformat the disks?
PS:
Don't forget: it's entirely possible either (or both) of the sticks might simply be broken. In which case there's basically *nothing* you can do (besides try to salvage the data on them).
I was afraid of that. And I tried to be as accurate as possible in opening post, but so much for that. I'm a hopeless case
For some reason this has become a personal challenge, so formatting for now is out of the question till I understand more of it. Spend last night reading and reading and reading .... I might never get to the bottom of it, but at least I can try.
1. It would definitely be worthwhile to get a "second opinion" (i.e. to verify whether or not there's something physically wrong with either or both USB sticks) by trying them on a different PC. Perhaps (for example) by doing a "mount", followed by "chkdsk", on a Windows PC?
2. It might also be interesting to probe the details of the (failed?) Linux mount, e.g. with something like usbmon:
I have three machines, a noname desktop, an Acer AspireOne 110 and a Fujitsu laptop.
The behavior on the Acer is the similar as earlier posted for the desktop. However on the Fujitsu, the BIOS attempts to boot from both disks and fails on both. The memory sticks are a Sandisk cruzer and a Verbatim store_n_go. Below the details what happens.
Code:
+----------+--------------------------------+---------------------+
| | store_n_go | cruzer |
+----------+--------------------------------+---------------------+
| desktop | invalid system disk | boots from HD |
| acer | no bootable partition in table | boots from HD |
| fujitsu | invalid system disk | invalid system disk |
+----------+--------------------------------+---------------------+
There is one other thing that catches the eye and that is that the Acer displays a different message on the store_n_go. This message can be found in the MBR of the store_n_go .
This implies (in my opinion) that
the Acer is the only system that actually executes the code in the MBR.
the other systems do not execute the MBR and access other information on the memory stick to determine that it is bootable.
I'm going to try to 'reverse engineer' the POST of the desktop to try to understand. Not sure if I'm ever able to do so due to time and due to the fact that my only reverse engineering experience dates from 15 years ago.
If I ever get somewhere, I will post again.
PS:
chkdsk in Windows does not give any errors on both sticks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.