Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Formatting a external hard drive

  1. #1

    Default Formatting a external hard drive

    Hey there everyone. I'm a new guy trying OpenSuse 11.4.

    What I've done is partition my external hard drive to have 130g for my Windows info. Then putting the 90g towards Linux. I used a live cd on my home computer to format the 90g of Linux. I'm simply wanting something to learn more about from time to time that I can use on my home computer, laptop, fiance's computer, etc. So the formatting went successful. I have linux on the 90g of hard drive that I wanted it on.

    The problem is this. When I take the live cd out, when I remove my external hard drive from my computer. The home computer (which has Windows) won't boot. It comes up with a error 21. But now when I boot with the external hard drive I use, I make it to the boot menu and can boot from Windows.

    I need to be able to boot from Windows on this home computer, since my mother and grandparents use this computer quite a bit. I'm not always going to have my ext. hard drive plugged into this computer, so I need some help if you all know now.

    Finally, is it safe to plug this into my laptop? Or should I wait?

    Thanks again everyone. I appreciate it.

    Taylor

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Formatting a external hard drive

    Hey there everyone. I'm a new guy trying OpenSuse 11.4.

    What I've done is partition my external hard drive to have 130g for my Windows info. Then putting the 90g towards Linux. I used a live cd on my home computer to format the 90g of Linux. I'm simply wanting something to learn more about from time to time that I can use on my home computer, laptop, fiance's computer, etc. So the formatting went successful. I have linux on the 90g of hard drive that I wanted it on.

    The problem is this. When I take the live cd out, when I remove my external hard drive from my computer. The home computer (which has Windows) won't boot. It comes up with a error 21. But now when I boot with the external hard drive I use, I make it to the boot menu and can boot from Windows.

    I need to be able to boot from Windows on this home computer, since my mother and grandparents use this computer quite a bit. I'm not always going to have my ext. hard drive plugged into this computer, so I need some help if you all know now.

    Finally, is it safe to plug this into my laptop? Or should I wait?

    Thanks again everyone. I appreciate it.

    Taylor
    It sounds like you installed the Grub boot loader on your Windows hard drive and not the external drive. First off, using an external drive and internal is OK and does not need to be fixed as long as Windows and openSUSE work. If you are bent on returning the internal drive back to normal, you most likely must use your Windows boot disk to repair your Windows installation by restoring the MBR (Master Boot Record) to its original Windows boot setup and perhaps set the (correct) Windows partition as active for booting. Doing this will stop openSUSE from loading properly. While you contemplate what I have said, here are some partitioning facts to think about.

    Each hard drive can have up to four PRIMARY partitions, any of which could be marked active and bootable. No matter what you might hear, only one of the first four primary partitions can be booted from. That means you can boot from Primary partitions 1, 2, 3 or 4 and that is all. In order to boot openSUSE, you must load openSUSE and the grub boot loader into one of the first four partitions. Or, your second choice is to load the grub boot loader into the MBR (Master Boot Record) at the start of the disk. The MBR can be blank, like a new disk, it can contain a Windows partition booting code or generic booting code to boot the active partition 1, 2, 3, or 4. Or, as stated before, it can contain the grub boot loader. Why load grub into the MBR then? You do this so that you can "boot" openSUSE from a logical partition, numbered 5 or higher, which is not normally possible. In order to have more than four partitions, one of them (and only one can be assigned as extended) must be a extended partition. It is called an Extended Primary Partition, a container partition, it can be any one of the first four and it can contain one or more logical partitions within. Anytime you see partition numbers 5, 6 or higher for instance, they can only occur inside of the one and only Extended Primary partition you could have.

    What does openSUSE want as far as partitions? It needs at minimum a SWAP partition and a "/" partition where all of your software is loaded. Further, it is recommended you create a separate /home partition, which makes it easier to upgrade or reload openSUSE without losing all of your settings. So, that is three more partitions you must add to what you have now. What must you do to load and boot openSUSE from an external hard drive? Number one, you must be able to select your external hard drive as the boot drive in your BIOS setup. Number two, you need to make sure that the external hard drive, perhaps /dev/sdb, is listed as the first hard drive in your grub device.map file and listed as drive hd0. I always suggest that you do not load grub into the MBR, but rather into the openSUSE "/" root primary partition which means a primary number of 1, 2, 3 or 4. If number one is used, then that will be out. You will mark the openSUSE partition as active for booting and finally you must load generic booting code into the MBR so that it will boot the openSUSE partition. I suggest a partition like this:

    0. /dev/sdb, Load MBR with generic booting code
    1. /dev/sdb1, Primary NTFS Partition for Windows
    2. /dev/sdb2, Primary SWAP (4 GB)
    3. /dev/sdb3, Primary EXT4 "/" openSUSE Partition Marked Active for booting (80-120 GB)
    4. /dev/sdb4, Primary EXT4 "/home" Your main home directory (Rest of the disk)

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3

    Default Re: Formatting a external hard drive

    Hmmm, I gotcha. Well here's the problem. I don't have a Vista boot disc for Windows. Am I in a rut or is there another way? Thanks for the help so far.

    Taylor

  4. #4
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Formatting a external hard drive

    Hmmm, I gotcha. Well here's the problem. I don't have a Vista boot disc for Windows. Am I in a rut or is there another way? Thanks for the help so far.

    Taylor
    I think you may be in a pickle without an original Windows boot disk. I suggest you consider it time to upgrade to Windows 7 or find a friend that can lend you their Windows Vista disk. You may be able to find a repair program online for $50 or so but without that friend, you need to stick with what you got or spend some more money, in my opinion.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  5. #5

    Default Re: Formatting a external hard drive

    You just need to write a generic boot code to the MBR of your internal disk.
    Look in YaST -> Boot Loader -> Boot Loader Installation -> Boot Loader Options ... and see if it does rewrite a generic boot code on your internal drive (It would during setup). But don't do it if you're unsure! You should not install Grub anywhere on your Windows disk.

    Or use ms-sys to write a Vista MBR. (this tool is not part of any Linux distro for obvious reasons. It used to be shipped with Debian/Ubuntu though).

    In both cases, you need to set the bootflag on your Windows partition before rebooting.

  6. #6

    Default Re: Formatting a external hard drive

    So I gotcha. So I need to pull up OpenSuse and go under YaST and do the following. Or do the other option. How would I set the bootflag to Windows? I'm deeply confused. I've been a Windows person for a long time, I'm not a novice in computers, but I am a novice in the BIOS and Linux.

    Thanks so far for the help. I appreciate everything.

    Taylor

  7. #7
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Formatting a external hard drive

    So I gotcha. So I need to pull up OpenSuse and go under YaST and do the following. Or do the other option. How would I set the bootflag to Windows? I'm deeply confused. I've been a Windows person for a long time, I'm not a novice in computers, but I am a novice in the BIOS and Linux.

    Thanks so far for the help. I appreciate everything.

    Taylor
    If you decide to reinstall openSUSE onto your Windows drive (you will need to make room for it), you could elect to write a generic MBR in the openSUSE installation. openSUSE will not give you a choice to set the Windows partition as active, but actually the Windows partitioning program will allow you to set the Windows partition as active for booting in Windows. Be careful as Windows 7 tends to create two partitions, one small one that actually boots and one large, for the rest of Windows which you do not boot, and so it is not set active for booting.

    Be careful as every time you install/reinstall Windows or openSUSE, when you are not real experience at doing this, you can mess up again. Do your home work and know what you need to do before you try to do it and good luck.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  8. #8

    Default Re: Formatting a external hard drive

    Quote Originally Posted by taylor_f View Post
    So I gotcha. So I need to pull up OpenSuse and go under YaST and do the following. Or do the other option. How would I set the bootflag to Windows? I'm deeply confused. I've been a Windows person for a long time, I'm not a novice in computers, but I am a novice in the BIOS and Linux.
    Again, I'm not sure that YaST will write a generic boot code without reinstalling. I've never done that. In fact, I never used generic bootcode at all (but I don't use Windows either, which makes things much easier). It will write a generic boot code for sure while installing and it even does that by default (to my dismay!)
    As for setting the bootflag, there are many ways to do it. You'll first have to type
    Code:
    fdisk -l
    to see which partition has the bootflag (indicated by a star).
    Then you can use fdisk, cfdisk or sfdisk under Linux as well as the command diskpart under Windows. All these commands are to be issued in a terminal and as root under Linux or administrator under Windows. Several GUI partitioning tools (like gparted available on Ubuntu live CD and Parted Magic live system) also allow you to set the bootflag.

    You can see an example with fdisk in this post: Invalid partition table - parted magic 5.8 - grub - Page 4, and an explanation about WIndows diskpart here: Windows and openSuse 11.4 dual boot problem - Page 5

    To set the bootflag on the first primary partition on the first hard disk with sfdisk, you'll just type the following:

    Code:
    su -c '/sbin/sfdisk -A1 /dev/sda'

    The big difference between sfdisk and fdisk/cfdisk is that sfdisk toggles the bootflag (set it on a partition and unset it on the other) while fdisk/cfdisk just set or unset the bootflag on a single partition (so you have to use two commands).

    You have to find out which Windows partition you need to activate. If you set the bootflag on the wrong partition and have generic boot code in MBR, nothing will boot anymore. As mentionned earlier, Windows 7 uses more than one partition.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    For the record (not what you want here), findgrub -a and updategrub -a can set the bootflag on the Grub (primary or extended) partition (findgrub will ask for confirmation, updategrub won't).

  9. #9

    Default Re: Formatting a external hard drive

    Gotcha gotcha. Is there anyway for me to remove Grub boot and remove OpenSuse completely for now and redo it the right way? Since I put it on my external hard drive and only used my desktop as a medium to get the OS on the external hard drive, would that work?

    Haha I appreciate all the help. Grandparents and Mom are getting a little ancy wanting the computer to get fixed, I'm just wanting to do this the right way this time.

    Again thanks for the patience and help.

    Taylor_F

  10. #10

    Default Re: Formatting a external hard drive

    The Grub bootloader in the bootsector of your extended partition doesn't bother anyone. As soon as this partition doesn't have the bootflag, it won't boot. It is safe to leave it there and definitely the better option if you're not familiar with bootsectors.

Page 1 of 3 123 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
  •