On this old dell (dual pentium), connecting the external drive (a seagate 2TB external 2.5" "backup plus" drive.
When I got the drive, I connected it after booting into fedora.
Partition 1 contained some windows related stuff for backup. I backed it up to another drive.
I partitioned the drive to two partitions only. Partition 1 is the entire drive - minus 8GB). Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
So far, so good.
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
If I disconnect the drive, reboot, then I get the Fedora boot menu, almost instantly. Before I select which kernel to boot, I connect this external drive and boot the latest kernel.
All is well.
So, what has remained on the external drive to cause bios to hang like that?
This is the partition info:
Disk /dev/sdb: 1.8 TiB, 2000398933504 bytes, 3907029167 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 33553920 bytes Disklabel type: dos Disk identifier: 0x1c95003a
Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 3890251950 3890249903 1.8T 83 Linux /dev/sdb2 3890288670 3907029166 16740497 8G 82 Linux swap / Solaris
On 03/17/2015 04:23 PM, jd1008 wrote:
Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
Why, and how? I don't think I've ever seen anaconda ask how a swap partition is to be formatted, because the kernel doesn't use a filesystem when reading/writing swap so the partition is left unformatted. You can, of course, create and format all of your partitions ahead of time but it's still a waste of time to format swap.
On Tue, Mar 17, 2015 at 5:23 PM, jd1008 jd1008@gmail.com wrote:
Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
I'm confused because this seems like partition 2 is swap and ext4.
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
What tool did you use to partition this drive?
parted writes bootloader code to LBA 0 instructing the CPU to read the first absolute sector defined by the MBR partition entry having an active bit set. If there's nothing there, it stalls.
The solution is to go to firmware setup and define a different drive as primary. Or zero the first 440 bytes of the external drive e.g. dd if=/dev/zero of=/dev/sdX bs=440 count=1
On 03/17/2015 05:56 PM, Joe Zeff wrote:
On 03/17/2015 04:23 PM, jd1008 wrote:
Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
Why, and how? I don't think I've ever seen anaconda ask how a swap partition is to be formatted, because the kernel doesn't use a filesystem when reading/writing swap so the partition is left unformatted. You can, of course, create and format all of your partitions ahead of time but it's still a waste of time to format swap.
Sorry, my bad!! I meant partition 1 as ext4.
On 03/17/2015 05:58 PM, Chris Murphy wrote:
The solution is to go to firmware setup and define a different drive as primary. Or zero the first 440 bytes of the external drive e.g. dd if=/dev/zero of=/dev/sdX bs=440 count=1
Interesting. I used fdisk. I guess fdisk does not clear those first 440 bytes?
I am a bit concerned about dd'ing 440 zeros from /dev/zero into this drive, as it has about 0.5 TB of data on it, and I have no room (yet) to back it up to :)
On 03/17/2015 05:58 PM, Chris Murphy wrote:
On Tue, Mar 17, 2015 at 5:23 PM, jd1008 jd1008@gmail.com wrote:
Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
I'm confused because this seems like partition 2 is swap and ext4.
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
What tool did you use to partition this drive?
parted writes bootloader code to LBA 0 instructing the CPU to read the first absolute sector defined by the MBR partition entry having an active bit set. If there's nothing there, it stalls.
The solution is to go to firmware setup and define a different drive as primary. Or zero the first 440 bytes of the external drive e.g. dd if=/dev/zero of=/dev/sdX bs=440 count=1
Also, fdisk does not show any boot flag being set on either partition.
I will look into bios settings to see how this drive is viewed by bios.
On Tue, Mar 17, 2015 at 6:08 PM, jd1008 jd1008@gmail.com wrote:
On 03/17/2015 05:58 PM, Chris Murphy wrote:
The solution is to go to firmware setup and define a different drive as primary. Or zero the first 440 bytes of the external drive e.g. dd if=/dev/zero of=/dev/sdX bs=440 count=1
Interesting. I used fdisk.
It may have had something else partition it before. What do you get for
dd if=/dev/sdX count=1 2>/dev/null | hexdump -C
I guess fdisk does not clear those first 440 bytes?
No. It's somewhat archaic, from the era when bootloader and partitions were married. Hence the MBR (LBA 0) is sometimes used to mean the partition map portion, and other times it refers to the bootloader code in the first 440 bytes of that same sector.
I am a bit concerned about dd'ing 440 zeros from /dev/zero into this drive, as it has about 0.5 TB of data on it, and I have no room (yet) to back it up to :)
Well the partition map data doesn't start until offset 446, so as long as you make sure bs=440 *and* count=1 it's not a problem. But you can also just redirect the firmware to another drive to avoid the problem.
On Tue, 17 Mar 2015 17:23:30 -0600 jd1008 wrote:
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
Sounds to me like the bios is trying to boot from that drive and can't handle it gracefully. I'd see if you can change the BIOS boot settings.
On 03/17/2015 06:19 PM, Chris Murphy wrote:
dd if=/dev/sdX count=1 2>/dev/null | hexdump -C
# dd if=/dev/sdb bs=440 count=1 2>/dev/null | hexdump -C 00000000 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 |........| 000001b8
# dd if=/dev/sdb bs=4b count=1 2>/dev/null | hexdump -C 00000000 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 3b 00 c5 1b 00 00 00 00 |........;.......| 000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 |............... | 000001e0 21 00 83 fe ff ff 00 08 00 00 af 80 e0 e7 00 fe |!...............| 000001f0 ff ff 82 fe ff ff 1e 18 e1 e7 91 70 ff 00 55 aa |...........p..U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000800
By the way, partition 1 starts at 2048 sectors (512 bytes sectors) offset.
On 03/17/2015 06:31 PM, Joe Zeff wrote:
On 03/17/2015 05:04 PM, jd1008 wrote:
Sorry, my bad!! I meant partition 1 as ext4.
Thank you; that seems much more reasonable.
Well, I just rebooted. I looked into the bios, and the boot order was to boot from 1. cd/dvd 2. usb drive 3. internal drive 4. esata external drive.
So, I guess it was my fault all along, because I had incorrectly thought that I had set the boot order to be
1. cd/dvd 2 interna drive 3 usb drive 4. esata external port drive
Sorry for all the noise guys!!!
On Tue, Mar 17, 2015 at 6:28 PM, jd1008 jd1008@gmail.com wrote:
On 03/17/2015 06:19 PM, Chris Murphy wrote:
dd if=/dev/sdX count=1 2>/dev/null | hexdump -C
# dd if=/dev/sdb bs=440 count=1 2>/dev/null | hexdump -C 00000000 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 |........| 000001b8
No bootloader code.
# dd if=/dev/sdb bs=4b count=1 2>/dev/null | hexdump -C 00000000 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 3b 00 c5 1b 00 00 00 00 |........;.......| 000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 |............... | 000001e0 21 00 83 fe ff ff 00 08 00 00 af 80 e0 e7 00 fe |!...............| 000001f0 ff ff 82 fe ff ff 1e 18 e1 e7 91 70 ff 00 55 aa |...........p..U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
It has no partition 1 or 2 entry, they're in 3 and 4.
So kinda interesting, I guess either the firmware gets confused due to lack of a 1st partition, or it just has no fallback mechanism when the first drive it finds has no bootloader code.
On 03/17/2015 04:23 PM, jd1008 wrote:
On this old dell (dual pentium), connecting the external drive (a seagate 2TB external 2.5" "backup plus" drive.
When I got the drive, I connected it after booting into fedora.
Partition 1 contained some windows related stuff for backup. I backed it up to another drive.
I partitioned the drive to two partitions only. Partition 1 is the entire drive - minus 8GB). Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
So far, so good.
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
If I disconnect the drive, reboot, then I get the Fedora boot menu, almost instantly. Before I select which kernel to boot, I connect this external drive and boot the latest kernel.
All is well.
So, what has remained on the external drive to cause bios to hang like that?
It's pretty common for the BIOS to, by default, try to boot external media (CD ROM, USB, eSATA and such) BEFORE booting a local hard disk. This is how you can boot a rescue CD or install software without disconnecting your internal hard drive first.
If you ABSOLUTELY must have the drive attached at boot time, get into the BIOS and change the boot order so the internal drive is tried BEFORE your USB stuff. Remember, however, that if you do this, then you won't be able to boot any external media unless you flip the BIOS back.
Thou hast been warned! ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - grasshopotomus: A creature that can leap to tremendous heights... - - ...once. - ----------------------------------------------------------------------
On Tue, Mar 17, 2015 at 6:45 PM, Rick Stevens ricks@alldigital.com wrote:
It's pretty common for the BIOS to, by default, try to boot external media (CD ROM, USB, eSATA and such) BEFORE booting a local hard disk.
If it's common, it's a good reason to consider parted's behavior a bug these days, because it guarantees the system face plants upon existence of non-bootable external media.
If you ABSOLUTELY must have the drive attached at boot time, get into the BIOS and change the boot order so the internal drive is tried BEFORE your USB stuff. Remember, however, that if you do this, then you won't be able to boot any external media unless you flip the BIOS back.
I have an ancient system, ~2004 firmware, that offers F12 for a one time boot menu from which I can choose myriad boot drive options including USB.
If parted is used to partition, firmware face plants on that drive. So does VirtualBox (SeaBIOS). If any other tool is used to partition, both firmwares bypass this drive, and try the next one in the list.
In this paradigm, it was parted that was expected to write jump code to the first 440 bytes, while e.g. syslinux write some minimal code to the VBR, which then pointed to a binary blob also found in the filesystem, the actual bootloader. syslinux's install command doesn't touch the MBR at all, it only writes to the VBR (or BIOS Boot if it's a GPT partition type).
Whereas GRUB's grub-install puts its own code in the MBR, which doesn't at all depend on active bit (boot flag), it directly forwards to an LBA. So as long as the firmware can address that LBA, the GRUB stage2/core.img can be essentially anywhere hence fewer limitations.
On 03/17/2015 06:45 PM, Rick Stevens wrote:
On 03/17/2015 04:23 PM, jd1008 wrote:
On this old dell (dual pentium), connecting the external drive (a seagate 2TB external 2.5" "backup plus" drive.
When I got the drive, I connected it after booting into fedora.
Partition 1 contained some windows related stuff for backup. I backed it up to another drive.
I partitioned the drive to two partitions only. Partition 1 is the entire drive - minus 8GB). Partition 2 is 8GB swap partition. I formatted partition 2 ext4.
So far, so good.
Now, if I power up with this external drive connected (usb3), all I get is a cursor at upper left corner.
If I disconnect the drive, reboot, then I get the Fedora boot menu, almost instantly. Before I select which kernel to boot, I connect this external drive and boot the latest kernel.
All is well.
So, what has remained on the external drive to cause bios to hang like that?
It's pretty common for the BIOS to, by default, try to boot external media (CD ROM, USB, eSATA and such) BEFORE booting a local hard disk. This is how you can boot a rescue CD or install software without disconnecting your internal hard drive first.
If you ABSOLUTELY must have the drive attached at boot time, get into the BIOS and change the boot order so the internal drive is tried BEFORE your USB stuff. Remember, however, that if you do this, then you won't be able to boot any external media unless you flip the BIOS back.
Thou hast been warned!
Right. Did just that. I had a mistaken assumption as to what I had set the boot order to. It has been corrected.