Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Safely move bootloader to another disk

  1. #1
    Join Date
    Mar 2009
    Location
    Bangkok
    Posts
    431

    Default Safely move bootloader to another disk

    Ages ago I installed Linux on a "spare" 40GB disk and I don't remember how, but that disk is where I still boot the computer from, in Bios it's listed as a primary master and HD0.

    Over the time my installs moved to the "main" disk where it is now Suse 11.3 alongside Windows.

    I want to get rid of that original "spare" disk altogether, physically take it out, but don't know how to move the bootloader to the "main" one.

    I'm confused by all the options offered in Yast Boot Loader Location menu.

    Can I just tell it to put itself into a custom boot partition and point it to dev/sdb, the current designation of the "main" disk?

    Would I need to edit Grub as well? I figure the current "sdb" would be called "sda" after I take the old disk out. Would it be safe to simply rename /sdb entries, things like /sdb4 to /sda4 and so on?

    Additional question - I used to play with Win7 demo, deleted that now, but its loader still pops up when I boot into Windows with their "earlier version of operating system" menu. Their offered solution is to run "mbrfix" from a WinXp recovery CD.

    My question - what would that mbrfix do to the Linux bootloader and how can I get it to point back to to Grub afterwards?

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,743
    Blog Entries
    20

    Default Re: Safely move bootloader to another disk

    If you remove your old disk you will need to re-do the bootloader and much editing

    Why not just leave it in for now, like a rather large boot device ;-)
    Then when you are ready to install 11.4, remove it and all will be easy.
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Mar 2009
    Location
    Bangkok
    Posts
    431

    Default Re: Safely move bootloader to another disk

    It has got a bunch of unreadable sectors and from boot log I can see it throws up a lot of warnings. Earlier someone here recommended to throw it away immediately.

    I suspect those errors could be responsible for the machine not logging me in automatically two times out of three, though it could be something else, I would need to boot the system without the faulty disk and see how it behaves then.

    I guess I can remove it from fstab first and not mount it at all. Perhaps there's a setting somewhere for SMART to ignore checking it for errors, too.

    How far off is 11.4? December?

    How different would be from running "recover" option from 11.3 DVD now, without the old disk?
    Last edited by Stan_Ice; 25-Aug-2010 at 05:24. Reason: Typo - unreadable sectors",

  4. #4
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,743
    Blog Entries
    20

    Default Re: Safely move bootloader to another disk

    The repair installed system has been removed from 11.3

    How much room do you have on this disk you have suse on now. Could you make a small partition, say about 10GB max. Enough to install Mint or Ubuntu?
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,458
    Blog Entries
    14

    Default Re: Safely move bootloader to another disk

    I'd say you could take out the disk, then boot from a Live CD. From there on, you could switch to the installed system, start Yast and reconfigure and reinstall the bootloader. Please first show is the output of
    Code:
    fdisk -l

    I have to lookup the exact sequence of commands, but I know it can be done this way
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,458
    Blog Entries
    14

    Default Re: Safely move bootloader to another disk

    Already found what's needed, please download a LiveCD, boot from it, and post the output of the command above ( to be done in a terminal window)
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,743
    Blog Entries
    20

    Default Re: Safely move bootloader to another disk

    Quote Originally Posted by Knurpht View Post
    Already found what's needed, please download a LiveCD, boot from it, and post the output of the command above ( to be done in a terminal window)
    You cool dude
    I was leading him a long way around.
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,458
    Blog Entries
    14

    Default Re: Safely move bootloader to another disk

    Needed this meself a couple of months ago, in this one How to repair system without DVD, post #15 from ken_yap. That opened new horizons for me, knowing to be able to do things on a non-booting system. Credits to ken_yap, the translation to what else one could use these four lines for was open to me.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9
    Join Date
    Mar 2009
    Location
    Bangkok
    Posts
    431

    Default Re: Safely move bootloader to another disk

    As if on cue, the old drive has disappeared from BIOS.

    I should probably open the case and check the connections, but at this point I can boot into Live CD and Bios can see my "primary slave" where my Suse is so fixing should be possible.

    It's getting late in this part of the world so I'll leave it until tomorrow.

    Not sure if fdisk -l would give the same output if my working disk is registered as a slave, as it is now, or as a master, after I take the old drive out and reconnect the wiring tomorrow.

    Current output is coming up, from Live CD

  10. #10
    Join Date
    Mar 2009
    Location
    Bangkok
    Posts
    431

    Default Re: Safely move bootloader to another disk

    linux:~ # fdisk -l

    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x3a7fa39b

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 4121 33093900 7 HPFS/NTFS
    /dev/sda2 7298 12166 39110242 83 Linux
    /dev/sda3 4121 7297 25519221 83 Linux
    /dev/sda4 12167 14593 19494877+ 83 Linux

    Partition table entries are not in disk order

    Disk /dev/sdb: 750.1 GB, 750156374016 bytes
    255 heads, 63 sectors/track, 91201 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xa4b57300

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 91201 732572001 7 HPFS/NTFS
    linux:~ #

    The sdb here is an external drive plugged into USB.

    Oh, and this live CD is Suse 11.1, with no ext4 support so I can't even read fstab or grub from the installed system.

    I've got 11.3 gnome and KDE at the office, I think. Otherwise it might take a while to download and burn them.

    Hope you guys can give me some directions over the next few hours, I might try to fix this thing in the morning.

    I can leave it in this LiveCD mode overnight, I think, for speed reasons - booting up and getting network up manually takes good ten minutes and the default ipv6 takes some five six page reloads to connect to anything with Firefox.

Page 1 of 2 12 LastLast

Posting Permissions

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