Safe USB-Install

Hello

I am new to Suse and want to install it to an USB. I found this theard:

http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/427135-opensuse-11-2-usb-hard-disk-install.html :

"Basically, it’s a normal install. However, you have to use the custom
partitioning - don’t accept any suggested layout for modification - to
ensure you only install on the USB drive and leave /dev/hda untouched.

At the confirmation stage, select change and write GRUB to the MBR of
the USB drive by re-ordering the drive list so that the USB drive is the
first and leaves the /dev/hda MBR unchanged. That allows you to use F12
or ESC (or whatever your system has) to select the boot device."

Now I want to know if this is really safe:
** I want to install Opensuse to USB without touching the built in HDD, so I want everything installed to USB! Meaning, that if I want to boot from USB I switch the boot
priority to USB in my bios. I want a real install, not a persistent live USB. Is the above described method really safe?**

I also found this one:
Jetchisel’s CyberCabin: OpenSuSE on a pendrive

But if the first method would work, I would be very happy, because the second needs lot of time.

For advise I would be very thankful!

Thanks

Here is another link that might be useful to read: SDB:Installation on external hard drive - openSUSE

So, its safe enough to perform this procedure as long as you understand a few things in advance.

  1. The openSUSE installer will create an installation on your main boot hard drive by default.
  2. You need to be comfortable in creating a custom partition setup on the external hard drive, placing everything that belongs to openSUSE there.
  3. You MUST change the default hard drive booting order in the BOOT section so that the external hard drive is first before you start the install.
  4. Most external hard drives will have a completely blank Master Boot Record (MBR) which means you must either install the Grub Loader there or place a generic boot MBR there for it to boot.
  5. You must be able to select the external hard drive as your boot drive in your BIOS setup.
  6. USB 3 hard drives and GPT, or the GUID (Globally Unique IDentifier) Partition Tables can be problematic for openSUSE.

Here is another bit of info partition for openSUSE: http://forums.opensuse.org/content/111-partitioning-hard-disk-during-install.html

Before you are ready to install, don’t let it start if anything does not look or feel right to you. Make sure to backup any important data on the internal hard drive before you proceed.

Thank You,

Hello

Thank you for your explanation! I know how to do partitioning and i will choose a normal ms-dos partition table or similar. Could you please explain step 4 to me more concrete?

Thanks.

Why would you use a MS file system to install Linux???

Just be sure that the target for the MBR code is the external device you want to install to.

First, you would want to use an EXT4 partition type for the openSUSE root / partition and for the /home partition and if you don’t understand why, then its imperative to stick with the EXT4 partition type. I always create a SWAP partition of 4 GB and it is its own type of partition. The openSUSE Partitioner can create ms-dos FAT partitions, but create one only to pass data to Windows if its required. I normally use NTFS for that purpose, but it must already exist as openSUSE can not create it. As for step 4, consider that for any hard drive to boot, there must be a Master Boot Record, MBR, that is been filled with some sort of boot code. All new hard drives will have a blank MBR and external ones in particular will not have had some sort of OS installation before now that might have placed a MBR capable of booting your computer. Therefore, either select the Grub boot loader to be placed into the MBR (recommended), which you can see from the main pre-installation menu, or else in the booting section detail, make sure that generic boot code is being installed on the external hard drive.

Thank You,

Thanks guys! Everything went well! I followed the guide jdmcdaniel3 gave me:

SDB:Installation on external hard drive - openSUSE

This guide is really excellent!

Although I have another question: The editor suggest to make a \boot partition in the case the USB is unplugged while the system runs. Does this also help if I have a boot partition but I boot from MBR?

Thanks

A boot partition is nothing more then a separate partition the holds the mount point /boot. ie the stuff that is in the /boot directory is simply on a separate partition. Not sure how this helps in unplugging mounted running OS??? The sudden removal of a mounted partition can cause a corrupted file system. So not a good idea to simply rip out a USB device without first shutting down the OS

.

NO need to make a separate /boot partition. Your whole deal is to make a USB hard disk that boots openSUSE and when removed, your old Windows partition boots as normal. You have done just what you set out to do and no other modifications are required.

Congratulations on your successful openSUSE installation!

Thank You,

Hello again!

New problem: In the latest developer release, there is a change to GRUB2. In the installer there is no possibility to modify configuration files of GRUB2. The only option I have is switch back to GRUB and do the same as in the last release.
Now I have a question: Does GRUB2 provide scripts that dedect the right hd automatically or is the missing possibility to edit the files just a missing feature in the installer which will be added to the installer till the release?

Another question: As you stated it is not essential to have a boot partition and I know that. But in the guide you gave me it is advised:

"It is recommended to use a separate boot partition. It is very likely that for some reason your disk gets un-plugged while your system is running. It can be as simple like pulling the wrong USB cable when you want to un-plug some other device. When this happens, there’s a big change your root partition becomes corrupted. If /boot is on that partition, you risk your system becomes unbootable. "

I think this is indeed true, because in the case you unplug the usb accidentally the boot partition can’t become corrupted, because it isn’t mounted by default!
But I think it is better not to use a boot partition if you compile kernels as I did, because of the creation of an initial ramdisk.
A little off topic question: I compiled my own kernel and installed it (compiled by make rpm, source kernel.org). In Yast it shows that the size of the installed kernel is 1.888 GB. Is this normal? I can boot into the kernel and everything works well!

Thanks for your help!

So, before I say more, some things are a matter of opinion for which not everyone shares the same one. That being said here is my response to your questions.

  1. openSUSE 12.2 will indeed use Grub2, but this is only a pre-release version and for which not all bugs have been fixed. Its not recommended for those new to it all to install openSUSE 12.2 on their one and only install. In fact, I can only recommended you attempt to get VirtualBox working and perhaps install openSUSE 12.2 into VirtualBox and leave your real install alone. If I just had to play with a real install, consider I might create a new partition for root and /home, make root partition # 3 or 4 and load grub2 into partition # 3 or 4 and mark it active and to not install grub2 into the MBR. Then, with a LiveCD, I would mark openSUSE 12.1 back as active and use a chainload command from openSUSE 12.1 grub legacy to start up openSUSE 12.2. You are playing with fire right now if you are not really into making partitions and different grubs to work with each other. Trust me when I say VirtualBox is the best way to test out openSUSE 12.2 M2 as it exists today.

  2. openSUSE 12.2 will have scripts in the future to detect other OS’, but it does not work with M2 because the os-prober application is not being loaded by default and is missing. Remember it is pre-release alpha software.

  3. I can not recommended you have a separate /boot partition until you know a whole lot more about getting different versions of openSUSE to work together and it can be a problem trying to work with both grub legacy and grub2. Anyone that says this (use a seperate /boot) is simply an expert at getting openSUSE to work and its not for the novice as far as I am concerned. If you understand how a separate /boot works, you know enough on when to use it or not and know how to use it and it is not required to just use openSUSE.

  4. when you install openSUSE onto an external hard drive, pulling the plug at the wrong time could be a problem, but it may not be either. Like all things we should keep a good power source connected and resist the temptation to disconnect important cables at an inopportune moment.

  5. When you use YaST to install a new kernel, that is not compiling it per say. Kernel’s are actually small, but if you load the development package, a few gigabytes is very possible with over 30,000 lines of written code. I have a bash script you can use to compile the most recent kernel from kernel.org and before you are done, all space used by the new kernel might be 7 GB in total though the actual compiled kernel might be only 150 mb in size.

For more info on really doing a kernel compile, check out my bash script here: S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.62 - Blogs - openSUSE Forums

Thank You,