Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, I have a laptop dedicated to test Linux distros. I often test Live CD on it. Boot order is correct : first CD, second hard disk. Few days ago ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136

    GRUB 2 installation : BIOS order impacted ?


    Hello,

    I have a laptop dedicated to test Linux distros.
    I often test Live CD on it. Boot order is correct : first CD, second hard disk.

    Few days ago I installed latest distro CrunchBang# with GRUB2 on hard disk.

    But since I noticed that I'm not able anymore to boot from CD ?!?
    I definitely cannot image GRUB 2 changing the BIOS order, correct ?!?

    I tried to press...press...press... the F2 key (as quickly display when power on) to enter BIOS setup but with no success at all : the laptop continue to boot via hard disk with GRUB 2, or it freezes on F2 until next key proceed again ... with GRUB 2.

    Next step, I replaced the hard disk with a new one.
    As there is no MBR or whatever boot on this brand new disk, then it I was again able to boot from CD.
    From there I installed latest Debian Squeeze still with GRUB2 on the hard disk ... and I got same problem now. I'm never able to grab F2 to access BIOS setup.

    Now my question is :

    how can I completely remove the MBR boot master on the hard disk to try to force booting from CD ? (I do not care to lost all data on this disk : it's only a testing laptop).

    Is the following command dd correct to completely wipe hard disk and remove MBR ?
    (I repeat : I'm OK to lost all on this disk)

    dd if=/dev/null of=/dev/XXX bs=446 count=1 where "XXX" is the id of your drive--eg hda, hdd, sda (note no partition id---just drive)

    Doing this I would like to be able to enter the BIOS setup once the laptop cannot boot and check boot order, but also BIOS verbosity ..etc...

    Many thanks.

    Bye,
    Bruno

  2. #2
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    360
    I definitely cannot image GRUB 2 changing the BIOS order, correct ?!?
    It should not be, likey the bios progam is at fault.

    dd if=/dev/null of=/dev/XXX bs=446 count=1 where "XXX" is the id of your drive--eg hda, hdd, sda (note no partition id---just drive)
    that will remove the boot code in the MBR but leave the partition table. At that point if the cd will boot you can get into the grub command line interface and use correct commands and boot into the hdd.

    If the above command still will not permit cd booting change to bs=512, that will zero out the complete MBR.

    You may need to put a MS or generic boot code into the MBR and grub on the linux root partition with the root made active/bootable.

    Would check if there is a bios update for your comp. NOTE: if you use the wrong update or something goes bad your comp will be a door stop.

  3. #3
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136
    Thanks for attention.
    Indeed I cannot see why boot order changed after GRUB2 installation...it always used to work with previous GRUB until last week.

    As a test, is it be possible to revert from GRUB2 to GRUB ?
    I googled about this and found some solutions (under Debian Squeeze which is my current distro).
    Is this revert supported ?

    Indeed as you mentioned the risk of facing a 'computer at door stop' I does'nt really fancy too much playing with commands like dd=...etc...
    I already spent +- 50-euro for a new hard disk this week...

    About BIOS upgrade, my laptop is an Acer Aspire 9100 which is +- 7-years old
    (reason why I use it to test live distros CD) but I'll give a try for this proposal.

    Bye,
    Bruno

  4. #4
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    360
    As long as there is no data on hdd to save, the 'dd' comand is safe. The bios update is what can cause a 'door stop'.

    As a test, is it be possible to revert from GRUB2 to GRUB ?
    Yes you can but the correct way I must leave for some one else to help. You could install SimplyMepis or OpenSuse , I'm sure they both as yet use grub legacy.

  5. #5
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136
    Hello.

    So I tried the following :

    (1)
    sudo fdisk -l
    55 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0004de1e

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 19143 153759744 83 Linux
    /dev/sda2 19143 19458 2528257 5 Extended
    /dev/sda5 19143 19458 2528256 82 Linux swap / Solaris

    (2)
    sudo dd if=/dev/zero of=/dev/sda bs=446 count=1

    (3)
    reboot

    But then no way to boot. The laptop continues to boot from hard disk where of course it freezes....as there is no more MBR.
    But yesterday when this new disk (so also without MBR) I was able to boot from CD-Rom because the hard disk did not contain a Boot record.
    Again no way to grab F2 for BIOS setup...it is displayed but never reached.

    Questions :

    - what did 'sudo dd if=/dev/zero of=/dev/sda bs=446 count=1' remove ?
    apparently not the MBR (or not completely) as result is different than when disk was new yesterday when I installed it.

    - how can I proceed from there. The laptop refuse to boot from CD-Rom and the disk freeze since 'dd if=/dev/zero of=/dev/sda bs=446 count=1' ?
    I think only choice I have is to install the hard disk in another laptop hopefully reacting in a more positive way.
    If not, well, I'm afraid I screwed my second hard disk in a week.

    As a conclusion about this incident, I only have this strange behavior with GRUB-2, never with GRUB Legacy.
    I installed may distros and/or used Live-CD on this laptop around 5-years old.
    I can only point here GRUB-2 here. : the laptop only react this way (wrong BIOS boot order) with GRUB-2...

    Note : if I remove the hard disk then I can boot from Live CD-Rom. Then, once boot is completed I tried to hot-pluig the hard dispk but obviously it is not recognized. Logically I suppose this type of device are not build for hot-plug installation.

    Bye,
    Bruno

  6. #6
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    360
    With out the hdd can you get into the bios ? If so be sure cd is first or only boot device and reboot with hdd in.

    I'm not into hot-pluing but , when the cd boots into the grub menu , plug in the hdd and continue to boot. IF the hdd is seen try the dd command but change 'bs=512' and that will remove all code in the MBR. 'see below'

    what did 'sudo dd if=/dev/zero of=/dev/sda bs=446 count=1' remove ?
    Look here The Standard Master Boot Record , it zeroed the boot code and left the partition table, the last 5 lines in pink at link above.

  7. #7
    Linux Newbie
    Join Date
    Dec 2008
    Location
    Luxembourg
    Posts
    136
    Lostfarmer you were right : as you mentioned, indeed I was able to boot on CD-Rom with a Live-Cd (and so get the hard-disk recognized).
    I achieved that by as soon 'Check Cd-Rom' is displayed I quickly (after few seconds it's too late...) plugged the hard-disk so it is then recognized to be eg. used for the hard disk installation of the Live-Cd (currently I used a Debian Live Squeeze CD).
    At least I can recover the hard disk...

    I'll try to check the BIOS settings later.
    Also try to install different distros using GRUB Legacy versus GRUB2 to see if i can obtain same strange behaviour ib both case.


    Bye,
    Bruno

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •