LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-15-2009, 04:55 PM   #1
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
memory stick and boot


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
 
Old 07-15-2009, 05:05 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

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.

'Hope that helps .. PSM
 
Old 07-16-2009, 01:24 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Hi paulsm4

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
 
Old 07-16-2009, 02:57 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

I (mistakenly) thought you *wanted* a boot disk.

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).
 
Old 07-16-2009, 10:57 PM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
I (mistakenly) thought you *wanted* a boot disk.
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.

Keep you posted.
 
Old 07-17-2009, 01:56 PM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, again -

Two additional suggestions:

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:

http://www.quietearth.us/articles/20...Snoop-in-linux

'Hope that helps .. PSM
 
Old 07-18-2009, 02:53 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Hi Paul,

it's getting a bit more confusing for me.

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.
 
Old 07-18-2009, 07:48 AM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I am not quite sure, but does the W95 FAT32 allow partitions larger than 2 GB? It seems that the partition on your first stick is 4 GB.

That doesn't solve the problem in your next posts tough.

jlinkels
 
Old 07-18-2009, 08:19 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
FAT32 can go a (relative) long way. Windows however has some limits on it's own invention See http://en.wikipedia.org/wiki/File_Al...on_Table#FAT32
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Have you tried the antiX USB Boot from a flash memory stick? namida12 MEPIS 2 12-29-2008 12:39 PM
Two USB memory devies (stick memory/jump drive) one works one not Mark_in_Hollywood Linux - Hardware 5 05-20-2008 07:35 PM
USB memory, Compact Flash, Memory Stick energiza Linux - Hardware 2 08-22-2006 09:29 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
memory stick / CF memory card reader X-dazed Linux - Newbie 1 01-21-2003 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:27 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
Open Source Consulting | Domain Registration