Just to answer your question, but don’t worry too much about the explanation since it is NOT the problem you have as your HD has a 512 byte sector size.
I didn’t mean the content, the filesystem (NTFS in this case) but the container, the partitions and more specifically the partitions boundaries. Since XP can not handle 4KB sector size, one hack (not the only one) on the partition table is to increment the first logical sector and “push” the partition to align logical and physical sectors. Whether you have XP or not as operating system isn’t relevant. But Linux might not be able to access partitions on hard disks using this hack for XP compatibility unless you blank the partition table and recreate it. Reformating a partition and reinstalling Linux won’t help in such cases. But again, this is not the probleme here.
Here are a couple things you need to check:
is your BIOS set to ahci mode or IDE legacy mode? I’ve seen cases where Linux would not boot while in legacy mode (simply not find the partition) but this is very mainboard specific.
have you ever been able to boot an operating system installed on your external USB HD with this mainboard?
Does it makes a difference if you switch the storage mode?
When you installed Linux from CD/DVD, did you have to change the BIOS boot order and if so how did it look like: CD/USB/HD or CD/HD/USB? And later, before you tried to boot the installed system, did you changed it to USB/HD? So if - as I suspect - the order during installation was CD/HD/USB, Linux has been installed on sdb which was hd1 at this time.
What else does actually boot on this computer? What’s on your internal HD? (can you show us the complete output of fdisk -l?)
After turning on my laptop at the splash screen i have an option to enter boot menu by pressing F11. By doing so i’m presented with a list of available boot devices from which i can choose my USB external hard drive. If i do not enter the boot menu then my laptop boots windows normally from the internal HD.
If i choose my external HD in the boot menu then the black screen with the blinking cursor appears. At this point it does not respond to any keyboard input. The only way to turn off my laptop now is by pressing the power button.
I’ll try to hook up the USB drive to my other desktop PC to make sure that my laptop’s (MSI GX623) hardware isn’t the cause of problem.
In BIOS under advanced options there was an entry “AHCI mode”. Think it is enabled but i’m not really sure. Selecting “Enable” next to the entry brings up a list with “Disable” and “Enable”(highlighted) but after selecting “Disable” it stays next to the entry (leading me to think that now i should press “Disable” and then select “Enable” to actually disable it. Does this make sense? ). By default the entry has “Enable” next to it.
Not from the external USB HD. But i was able to boot from openSUSE live USB, from which i installed at first. Also i was able to launch Super grub disk from my USB flash drive (installed under windows with Unetbootin, so i don’t know if it is still booted with GRUB).
Did not see any option in BIOS to change storage mode unless by it you mean the AHCI mode. If so, changing it had no effect.
The boot order has remained the same (CD/DVD, internal HDD, Network) since i can enter the boot menu and choose the booting device if needed as described in previous post.
I have been able to boot from live CD, live USB, that super GRUB USB i mentioned and Windows from internal HD.
Complete fdisk -l output:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbab21f87
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 312672255 156232704 7 HPFS/NTFS/exFAT
/dev/sda3 312674304 625137663 156231680 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x742fd272
Device Boot Start End Blocks Id System
/dev/sdb1 63 1866463892 933231915 7 HPFS/NTFS/exFAT
/dev/sdb2 1866465280 1874866175 4200448 82 Linux swap / Solaris
/dev/sdb3 * 1874866176 1927301119 26217472 83 Linux
/dev/sdb4 1927301120 1953523711 13111296 83 Linux
Some additional info:
Using my USB drive with the desktop PC had no effect. But i noticed some more details in the booting process. When the black screen appears at first the cursor is blinking at the upper left corner of the screen then it moves one line down and the external HD’s activity goes up (judging by it’s blinking light). The rest is as described before.
Based on the description of the boot, the External Hard drive is not booting which means to me a blank or corrupted MBR. I would say, that going into BIOS setup and making the external hard drive the boot drive would be my preferred method. If the Internal drive is listed to boot second and the External drive is missing, then the Internal drive should boot if the external fails. I must say that on a couple of computers I worked on, you could not get the external drive to boot without powering down the Computer and hard drive which you could try. I think this is a compatibility issue between the computer BIOS and the hard drive firmware. It is worth a try to see if it helps. If it does, a computer BIOS update might be worth perusing.
I went into BIOS and set the USB drive as first drive and powered everything off. After booting the computer the black screen appeared same as before. I tried to boot it another time but this time switched the drive off after the black screen showed up again. Only then did the 3rd boot device - the network card - boot (for some reason i could set only one of the drives as boot device).
Since i tried to boot the drive from another computer i don’t think a BIOS update will solve the problem. Also it might be that i already have the latest BIOS version (have to check to be sure though).
You should install Grub in the MBR of your USB drive. You have nothing to lose since it is not your Windows boot drive. There is no point not to have Grub in MBR and having a generic boot code jumping to nowhere. Obviously your root partition (sdb3) can not be reached at that point. You have a black screen because the generic boot code doesn’t know where to go. Grub in MBR might not be more successful but should at least give an error which would be an indication that it is trying to boot. Boot from live CD, become root in a terminal (with su -l) and type:
grub
grub > find /boot/grub/stage2
it should return (hd0,2) or (hd1,2) depending which one is sdb3
if it returns (hd0,2), type:
root (hd0,2)
it should answer: Filesystem type is ext2fs, partition type 0x83
Then type
setup (hd0)
if it returns (hd1,2), type:
root (hd1,2)
it should answer: Filesystem type is ext2fs, partition type 0x83
Then type
setup (hd1)
Finally type
quit
and reboot.
Make sure you understand this. Don’t write Grub into the MBR of your internal drive or you won’t be able to boot Windows!. If you’re unsure, don’t do it and wait until someone provides a simpler explanation or even a better solution.
If you did it and it doesn’t work and you get an error 17 or similar, the next step would be to erase these 3 partitions (not just the content), create the partitions yourself (with PartedMagic), install openSUSE in expert mode and select these partitions. You’ll just have to format them in the setup. But formating doesn’t modify the geometry (start position and size) of partitions, it only replaces their content.
On 2011-04-11 11:36, stealthiness wrote:
>
> After turning on my laptop at the splash screen i have an option to
> enter boot menu by pressing F11. By doing so i’m presented with a list
> of available boot devices from which i can choose my USB external hard
> drive. If i do not enter the boot menu then my laptop boots windows
> normally from the internal HD.
>
> If i choose my external HD in the boot menu then the black screen with
> the blinking cursor appears. At this point it does not respond to any
> keyboard input. The only way to turn off my laptop now is by pressing
> the power button.
No MBR. It should contain grub. You can not use generic mbr code there, I
think.
file -s /dev/sdb*
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
Here’s the output from when installing grub, all seems ok to me.
grub> find /boot/grub/stage2
(hd1,2)
grub> root (hd1,2)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+17 p (hd1,2)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.
I’ll attempt to reformat the partitions later this evening. But should the results when using PartedMagic be any different from before when formating at the install?
It might. When you create partitions with PartedMagic (or another partitioning tool) you do what you want, meaning you choose the start position and the size of each partition (primary or logical). PartedMagic should adjust the position to cylinder boundaries (I guess). Be careful not to create logical partitions! You don’t need any. I think PartedMagic might want to create logical partitions by default.
When you see Error 17, do you have a Grub shell? Are you able to type something? Like for example:
find /boot/grub/stage2
Also try to boot your USB disk (which now has a bootloader in MBR) on another computer.
As long as you use PartedMagic only to erase/create partitions, it doesn’t matter. We didn’t intend to use it for anything else. The OP just reinstalled Legacy Grub from live CD.
@stealthiness
I noticed that your internal HD has 512b sector size but the 1st partition starts at sector 2048. I’m not familiar with Windows laptops though. But just wondering why and what they might have put in these 2 kb (?) Maybe a Windows expert could tell us.
That’s a good question. Since parted default is to use MiB for optimal performance, I would say “cylinder”… just assuming openSUSE setup would use parted default, and you have seen the result already. When you reinstall openSUSE, install Grub in both location: MBR and your root partition… and do not write generic boot code to MBR!
Ok, i partitioned my drive with PartedMagic - deleted the old linux partitions and created new ones aligned to MiB (i left my NTFS partition as is). At the install i set GRUB to be written to external HD’s MBR and to the root partition and set the boot partition as active. But it seems nothing has changed. I’m still getting error 17 (still can’t type anything either).
Here’s some info if it helps.
fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbab21f87
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 312672255 156232704 7 HPFS/NTFS/exFAT
/dev/sda3 312674304 625137663 156231680 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x742fd272
Device Boot Start End Blocks Id System
/dev/sdb1 63 1866463892 933231915 7 HPFS/NTFS/exFAT
/dev/sdb2 1867962368 1876518911 4278272 82 Linux swap / Solaris
/dev/sdb3 * 1876518912 1925672959 24577024 83 Linux
/dev/sdb4 1925672960 1953523711 13925376 83 Linux
Do you see the menu before getting the error ? If yes , press ‘Esc’ and get to the command prompt for grub. Type in root (hd0, press Tab, is the 4 partitions of sdb displayed ? Or is it the 3 partitions of sda ?
The Grub menu is not really relevant. The error occures before Grub gets to read the menu. The partition containing the menu and Grub stage2 (the part of Grub in the directory /boot/grub ) can not be mounted because, either it is looking on the wrong disk (BIOS settings) - which I doubt since you’re at least trying to boot the right disk, or the partition is located too far or aligned in a way that it can not be reached.
If you compare your fdisk output with the previous one, you’ll notice that the partitions start position and size have changed. This is what I expected and it was worth a try. Hmmm … the different possibilities I can think of:
try different boot orders and SATA/AHCI mode settings in your BIOS.
look if pressing F11 and selecting a device is different from explicitely changing the boot order in BIOS setup.
Backup your Windows partition and blank the first sector. Then reinstall Linux while placing the Linux partitions at the top of the disk. The easiest would be to get another external USB drive if you can afford it.
Or create a small /boot partition (100MB) on your internal HD, install Linux in expert mode while selecting both harddisks. I wouldn’t say it is complicated but I can imagine it would be. Well, ok, it is complicated. If you had such a partition, you could boot it from Windows boot menu with a trick (consisting in writing the bootsector of this partition in a file) without having to install Grub in the MBR of your Windows drive - as many people are afraid to. But it woud not affect Windows booting behavior … of course if done correctly.
I do not recommend the last option, just mentionned it as a possibility.
I could try to change some options in my other PC’s BIOS, it seems it is more configurable than my laptop’s. But looks like soon there will be nothing else left to try except moving Linux partitions to the beginning of the disk. Just have to find where to back up all that data. I’ll post back if i have any progress.