Jump to content

KSP on Linux Live USB


Recommended Posts

Should be possible but you'd have to roll your own custom distro with the proprietary drivers and a script to detect your card.

Another option would be to install to a flash drive and update it with the gfx driver.

Pendrivelinux has a lot of info on setting up Linux on a USB stick, and Ubuntugeek has this article on making a custom distro.

Link to comment
Share on other sites

Best thing to do is play with a virtual machine, try installing something and messing with it, see if you can break it and then try fixing it again :)

Ubuntu is a good place to start for a Linux beginner, and installing software is not too hard as there's a built-in software store, though Ubuntu is over the top for a KSP live cd.

The Xubuntu guys recently released Xubuntu Core, which is just the desktop and no programs, it's smaller, light on resources and could be loaded with only what KSP needs.

There's tons of resources online to help with almost any issue you might run into, usually a google search for whatever you need will turn something up :)

Link to comment
Share on other sites

Regarding installation: You should be able to install Linux to a USB drive just the same way as installing it to a HDD. For Linux both are just block devices, and modern BIOS (but not EFI) treats them just as HDDs. So, I'd take two USB drives (or one DVD and one USB drive), where one of them will be made into an installation medium, and the other will be the target of the installation. There are several things to look out for though.

  • If your computer is new enough to use EFI firmware, you have to be careful about which firmware mode you're using, EFI or BIOS. For a bootable USB drive I'd use BIOS mode. The reason is, that for booting in BIOS mode the firmware always reads the drives boot sector and if there is bootable code there, it will allow you to boot from it, while for EFI there exists a list of bootable entries within the firmware's own storage in addition. While I don't think that an additional boot entry in EFI would really create troubles, using BIOS mode is the safer solution, as this way the computer's EFI configuration remains untouched. Otherwise a boot entry for Linux would be added to the EFI configuration, and I'm not certain how well that'd work if your USB drive isn't plugged. For most Linux installers it depends on the way the installation medium is booted, whether or not it'll use EFI mode. So, to be on the safe side boot the installer in BIOS/legacy/(anything that isn't EFI) mode. If your computer no longer supports BIOS mode, you might have to tell the Linux installer to use the main HDD's EFI partition, but I'm honestly not sure about this.
  • You'll want full control over partitioning and bootloader installation. There's nothing worse than accidentally messing up your main HDD because the Ubuntu an oversimplified installer thinks it's smarter than you. If there still were something as an Alternate installer for Ubuntu I'd advice to use that, but sadly support for it was dropped in 2012, so you're either stuck with using a distribution not based on Ubuntu, or be very careful to select the manual partitioning option ("something else") on this screen, and to select the USB drive for bootloader installation on the partitioning screen (which will likely NOT be sda if you haven't unplugged your HDD - on Linux hard drives are nowadays named /dev/sd[letter][number], where [letter] denotes the drive, and [number] denotes partitions.).
  • While partitioning create the required partitions on the USB drive. For a simple setup it's probably enough to just make one big partition with "/" as mount point (that's no way optimal, but read on). I wouldn't create a swap partition on the USB drive, but rather later place a swap file somewhere on the HDD. If you want to learn about partitioning for Linux, I can recommend Appendix C of the Debian installation guide. (Or Appendix C of the Ubuntu installation guide, which is obviously exactly the same, except that they replaced the word "Debian" by "Ubuntu". Don't waste time on reading the rest of the Ubuntu installation guide, it's horribly outdated. For instance the debian-installer has been replaced by ubiquity in 2006 or so...)
  • Before writing your partitions to disk, make sure that they are going to be on the USB drive, and that the bootloader is going to end up in the MBR of the disk containing the /boot partition. So, if your /boot partition is /dev/sdb1, the bootloader should go to the MBR of /dev/sdb. If your /boot partition is going to be /dev/sdc4, then the bootloader should go to /dev/sdc. If you haven't made a separate /boot partition, but just a / partition which for instance could be named /dev/sdb1, the the bootloader goes to /dev/sdb.

So, here is what I'd do, step by step. Don't blame me if anything goes wrong, this is just how I think it's done, but I haven't tried this myself.

  1. First: Backup all your important data, or do the installation to USB at a computer that doesn't have anything important on it.
  2. Second: Seriously, create backups. While of course there will be no data lost if the installation is done correctly, it's always possible that one hits the wrong button and accidentally formats the wrong drive.
  3. Make sure you have a Windows installation medium around. If you accidentally overwrite the bootsector of your HDD or mess up the EFI config it will help you make windows bootable again (although I'll not be able to help you with this, as I'm no expert on Windows).
  4. Next, get an installation image of the distribution you want to use. Xubuntu is a good compromise between speed and usability and it's easy to install, so let's get that one. With *buntu it's nearly always the best to use LTS versions, as versions in between just get 9 months of support and are usually less stable, so I'd download Xubuntu 14.04 LTS 64bit.
  5. Burn it to a DVD, if your PC has an optical drive. It's still the easiest way to use it. If not, create a bootable installer USB drive.
  6. Consider unplugging your HDD. If it isn't plugged, it can't be accidentally formated.
  7. Boot from the just created installation medium. If your computer supports EFI and legacy/BIOS mode isn't disabled in the EFI config (if it is, enable it...) it should show you two boot entries: One with EFI (or UEFI, or similar), and one without, or one with BIOS, legacy, or similar, and one without anything. In the first case, select the entry that isn't EFI, in the second, select the BIOS/legacy entry. Boot to the desktop ("Try Xubuntu without installing").
  8. Now let's find out the device node for the USB drive. Open a terminal window (there are other ways, but that is probably the most simple)
  9. Plug the target USB drive to a free USB port.
  10. Run "dmesg | tail". This command will show you the last few lines (tail) of the kernel output (dmesg), the | character means: take output of left command as input for right command.
  11. It should show a line like "[12345.67890] sd 11:0:0:0: [sdb] Attached SCSI removable disk". You'll care only about the part where in my example it sais "sdb". That's the device node our just plugged USB drive got. We'll try to only edit this one drive. Of course in your case it can be any other sd* name, depending on how many drives are currently connected. (As said, sda is the first HDD, sdb the second, and so on, while sda1 is the first primary partition on sda, sda2 the second primary, sda5 the first logical and so on.)
  12. Now, start the installer (there's an icon on the desktop).
  13. On the screen that asks about partitioning, select "Something Else".
  14. You'll now see a list of all connected drives (which should include usb drives). Only edit partitions on the drive determined in step 11. You can also open the dropdown menu for bootloader installation, which will show you the drive names, just to be sure that you're editing the right drive. I'd delete all partitions on the USB (there should only be one, or none at all) by selecting them and pressing the minus button. If there are no partitions on it, select the drive and click "New Partition Table". If it asks you if you wang GPT or MBR stop. You're using EFI, not BIOS mode, if this question pops up. Back to step 7. Or continue, and hope that EFI is smart enough not to break when you remove the USB (it very likely is smart enough, I'm just paranoid.)
  15. Now you should see the drive name, with "free space" below it. Select the free space.
    Partitioning depends, whether or not you're installing to a USB pendrive, or a USB HDD.
    • On a USB HDD it might make sense to create a swap partition. Think of it as a warranty: If the RAM gets full, this space can be used to remove unneeded data from RAM and store it until it is needed again.
      As on HDDs the innermost part is the fastest, and swap should be fast, let's first create a swap partition by pressing the small plus button. At the "use as" drop down, choos swap space. Choose to put it at the beginning of the free space. Ask five Linux users for optimal swap partition size, and you'll get five different answers, but in my opinion twice the size of your RAM is a good number. Still, if that's too much for your taste, half your RAM should be fine as well.
    • Pendrives are painfully slow. Putting a swap partition on them will likely have a negative impact on performance. Nevertheless this means that if RAM gets full, programs will be force-closed.

For this step by step guide we'll create just one data partition. As written above, appendix C of the Debian manual explains partitioning for Linux in more details, but as this is a single purpose KSP stick, separate partitions make little sense. We'll use all available memory. Create a primary partition in the free space, beginning or end doesn't matter. As mountpoint select "/" from the dropdown menu. File system is a good question. Ext2 is faster on USB, but Ext4 gives better data integrity. I'd use Ext4.

[*]Check the drop down menu for bootloader installation. You'll want it in the MBR of the USB drive. So, if it said "sdb" in step 11, and the dropdown list also sais that sdb is the USB drive, choose "sdb". Choose the USB drive itself, not the partition just created.

[*]When pressing the Install Now button, the installer will complain about the lack of swap space if you didn't create a swap partition. Let's ignore this for now. You can still create a Swap file on your HDD later if you want to.

[*]The system will now be installed to the USB drive. This will take some time (or, on pendrives a long time, as most pendrives are rather slow when writing).

[*]While installing, the installer will ask you to choose the default keyboard layout, your timezone, and will allow you to create a user.

[*]When the installation is finished, just reboot. You should now be able to tell your computer to boot off the USB.

Regarding the installation of KSP on Linux, please see the Linux thread.

An even safer way to install Linux to a USB drive is to use a virtual machine, as this will not expose your EFI and HDD. I'm currently installing Xubuntu to a USB drive this way, just for fun and to see if it works. For this of course one has to pass through access to the USB device the system should be installed to, and then boot the VM from the installation .iso. As I don't know how to use any Windows VM software, I sadly cannot give a step by step guide here, but I'm sure you get my point. I'll report once that's finished if it worked.

Edit: It indeed works to install Xubuntu to a real USB drive from within a virtual machine, by passing through direct access to the USB device.

Edited by soulsource
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...