uncalculated rhythms

tags

  • theoretical theology (79)
  • tips (2)
  • apocalypse (1)
  • book review (1)
  • end times (1)
  • linux (1)
  • plotting (1)
  • python (1)
  • quantum mechanics (1)
  • sage (1)

quick links (chrono-blog)

  • oldest theory
  • start of the Job arc
  • start of the HORN saga
  • begin Mark
  • begin Indignant

archive

  • ►  2020 (1)
    • ►  January (1)
  • ►  2018 (7)
    • ►  December (1)
    • ►  August (1)
    • ►  June (2)
    • ►  January (3)
  • ►  2017 (10)
    • ►  December (2)
    • ►  July (1)
    • ►  May (2)
    • ►  February (2)
    • ►  January (3)
  • ►  2016 (12)
    • ►  December (1)
    • ►  November (1)
    • ►  October (2)
    • ►  September (2)
    • ►  July (1)
    • ►  June (1)
    • ►  May (3)
    • ►  April (1)
  • ►  2015 (30)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  September (3)
    • ►  August (1)
    • ►  July (2)
    • ►  June (4)
    • ►  May (1)
    • ►  March (4)
    • ►  February (7)
    • ►  January (5)
  • ▼  2014 (22)
    • ►  December (7)
    • ►  November (7)
    • ►  October (4)
    • ►  August (3)
    • ▼  April (1)
      • Fatdog64 alongside (L)ubuntu
  • ►  2013 (1)
    • ►  August (1)

Saturday, April 19, 2014

Fatdog64 alongside (L)ubuntu

Hello!  So I had an adventure trying to get Fatdog64 running alongside my shiny new Trusty Tahr Ubuntu OS.  Fatdog64 is a very light distribution able to run in your RAM, so if you boot their iso file from a CD, you can actually take out the CD and it will continue running as if it were installed on your computer.  I wanted the ability to dual boot these guys without a CD, just for kicks.  Also I wanted them to be on separate LVM partitions.

In the forest I took a lot of wrong turns, but the actual roadmap was quite simple!  Here is the short version...

Disclaimer:  I don't modify any of the important Ubuntu boot files, but nevertheless:  don't do any of the following without backing up everything.  I can't make any promises that this will work for you. 

Setup:

I installed Ubuntu so that it would erase everything on the computer, using their "LVM" method to allocate drive space.  This created a filesystem with /boot outside of LVM and my / and swap file systems in an LVM setup.  LVM is very flexible, and allows you to grow partitions if necessary.

Afterwards, I booted into a LiveCD to reduce the size of their root partition, make a home partition, as well as a few other partitions for other OSes, all within the LVM.  I had to change my fstab in order to get my new /home partition working properly.  (That all could have been done through the Install GUI, probably.)  You can check out the Arch Linux Wiki for help on resizing/creating LVM partitions if you do it by hand.

Basics of installing Fatdog64:

You should probably check that Fatdog64 works by running it as a LiveCD.  But we will install it without even rebooting Ubuntu.  It's that easy.

So.  We have Ubuntu installed on LVM, and a few extra LVM partitions.  Download the Fatdog64 iso file, then open it up and grab the two files:  vmlinuz and initrd.  Put that in your desired LVM partition, where you want Fatdog64 to live and have files.

Now we have to tell Grub how to boot that disk.

On Ubuntu, edit /etc/grub.d/40_custom and add the following lines:

menuentry "FatDog64" {
    insmod lvm
    set root='lvm/ohd-tiny'
    linux /vmlinuz root=/dev/mapper/ohd-tiny ro withlvm savefile=ram:device:dm-5:fd64save waitdev=10
    initrd /initrd
}


Before you save it, you should change "ohd-tiny" to "YourVolumeGroup-YourLogicalVolume", and you should change "dm-5" to "dm-X", where X is the number of the YourLogicalVolume.  You can figure that out by running LVM's lvdisplay as root.  You should get something like this as output:

....

  --- Logical volume ---
  LV Path                /dev/ohd/tiny
  LV Name                tiny
  VG Name                ohd
....
  - currently set to     256
  Block device           251:5


and that last part of the Block device is what you want.  For me, X=5, so I use dm-5.

More explanation for config file:

menuentry "FatDog64" {
    insmod lvm
    set root='lvm/ohd-tiny'
    linux /vmlinuz root=/dev/mapper/ohd-tiny ro withlvm savefile=ram:device:dm-5:fd64save waitdev=10
    initrd /initrd
}



This is fairly straightforward now.  We need the LVM module so we load it via "insmod lvm".  From the LVM partition ohd (my volume group) tiny (my logical volume), we want to boot using LVM (withlvm) and save our Fatdog64 session to the savefile "fd64save" which we will create on that partition (dm-5, which is just the device-name for the LVM partition ohd/tiny).  The other flag "waitdev=10" says to wait for 10 seconds before booting to let devices load -- I will check and see if I can get away with a smaller number; this is very conservative.  You can also change the behavior of the savefile from "ram" to "direct" if you want it to save directly to the save file instead of saving things first in RAM and only directly intermittently.  See Kernel boot parameters for other helpful hints.

Booting Fatdog64:

Now we need to update grub to add our new custom menu item.  But first, you will probably also want to increase the grub TIMEOUT so that you have a chance to look at the menu.  That is found in /etc/default/grub, so you can edit it there and change the TIMEOUT setting.  I disabled the HIDDEN_TIMEOUT setting and went with the regular one:

#GRUB_HIDDEN_TIMEOUT=10
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10


Then you should run "sudo update-grub" to give grub the right menu items.

Reboot and select Fatdog64 from the Grub2 menu.  If all goes well, it will boot (waiting 10 seconds for devices), and it will also show all your LVM partitions down in the bottom lefthand corner of the Desktop.  It's super snappy to load, probably because it's running in your RAM.  That's pretty cool.

You are pretty much setup except to get your savefile parameters correct.  This can be done by rebooting the system.  It will walk you through a couple steps of where you want to put the savefile, and where you should want to put it is where Grub is telling Fatdog64 it is.  Put in on your dm-X (your logical volume) partition, like so:

First thing to do when booting Fatdog64:  reboot.

After you reboot, you should notice that the memory available to Fatdog64 linux (down in the systray) is about 1GB less than the size of your logical volume.

Now Fatdog64 is ready for general consumption.


Tweaks:

I also made it so Fatdog64 can easily access my home LVM partition.  What I did was create a directory (mkdir -p /house) to put my home partition on -- separate from the one Fatdog64 uses just in case -- and I made an entry for it in fstab.  I also allowed Fatdog64 to utilize the swap (for me it was dm-1, but you SHOULD BE VERY CAREFUL and check!).  Make sure no files are on that swap drive before going forward.  Pretty much swap was the only filesystem that did not show up in the bottom left corner of the desktop.

Setting up fstab in Fatdog64

For some reason the clock isn't on my correct time-zone, despite me having set it properly in the Fatdog control center.

Concluding remarks:

Fatdog64 will be very easy to update.  Just replace vmlinuz and initrd as necessary.

Posted by ible at 5:19 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: linux, tips
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

ible
View my complete profile
Copyright (2014-2015) Lucas Wagner. Some rights reserved. Powered by Blogger.