System Size (w Webmin Screenshots!)

Drew Ruggles's picture

OK, got Samba hobbled together enough to use VMware vCenter Converter to create a disk image from an XP machine to be used in Virtualbox on TKL Core appliance. Now when I started the 85GB convertion, I ran in to a wall on my TKL install. At first I thought it was a directory quota or a Samba limit, but it turns out to be the TKL partition limit.

I set up my TKL Core as a bare metal install on a brand new 500GB drive, which I had used GParted to format into two partitions -- 400GB ext4 and 100GB NTFS (this is my "just in case" partition). I used a LiveUSB drive to install TKL Core to the hard drive, and accepted the defaults for partitions, setting the size to "max" when asked about how much of the ext4 partition I wanted to use.

So I'm thinking I have this installed on a 400GB partition... right? Wrong. It created a 2.34GB partition and installed the TKL Core.

Edit Disk Partitions Screen Shot

Check out Partition 1 details (NOTE: Status = Not in use):

Partition 1 Details Screen Shot

...and Partition 5 details, where the TKL Core is installed:

Partition 5 Details Screen Shot

So I go poking around in System > Disk and Network Filesystems to see if I can change the size of Partition 5 or somehow get TKL Core moved over to Partition 1:

Disk and Network Filesystems Screen Shot

Clicking on / (Root  filesystem) above, gives me a chance to edit the mount:

Edit Mount (Root Filesystem) Screen Shot

Can I just change the Partition with ID to (SATA device A partition 1)? Or will this just destroy the entire Filesystem?

I also looked at the documentation, and found switch_root:

Manual page for switch_root(8)

SWITCH_ROOT(8)                                                  SWITCH_ROOT(8)

       switch_root  -  switch  to  another filesystem as the root of the mount

       switch_root [-hV]

       switch_root newroot init [arg...]

       switch_root moves already mounted /proc, /dev and /sys to  newroot  and
       makes newroot the new root filesystem and starts init process.

       WARNING:  switch_root  removes recursively all files and directories on
       the current root filesystem.

Does this make any sense to use in my scenario?



Jeremy Davis's picture

switch root sounds interesting, can't say I've ever even heard of it! And assuming you haven't done too much work, why not give it a go. Worst case scenario you can start again right!? I know you've probably done a bit by now but I bet you've learned heaps and you'd be able to redo it all pretty quick. Also you will probably need to update grub (the bootloader) once you've moved it

If on the other hand, you don't want to risk starting again, you could just add partition 1 to the TKL LVM. You'll need to leave a small ext4 partition right at the start of the drive though (because Linux needs a 'real' FS to boot from. There's a blog post Liraz did on LVM and it's really easy from the commandline. AFAIK there is a Webmin LVM module too, but it's probably worth reading the blog post first anyway, so you've got a bit of an idea how it all works.

Or just start again... I haven't ever install TKL to real hardware (only ever VMs) so I haven't ever touched the partitioning, but perhaps it's easier to just start with a clean HDD and create a TKL partition as big as you want, straight off the bat, then partition the rest of the blank space later? TBH I don't know.

Drew Ruggles's picture

So I did a backup and tried switch_root, which complained that my /dev/sda1 wasn't a directory, so it failed. Probably just as well. Spent a few minutes over at the Ubuntu documentation, and came up with a plan:

  1. Boot from GParted LiveUB
  2. Shrink /dev/sda1 by 100GB
  3. Expand extended /dev/sda3 by 100GB
  4. Move /dev/sda5 to beginning of Extended partition
  5. Expand /dev/sda5 by 99GB
  6. Move Swap /dev/sda6 to beginning of remaining space
  7. Expand Swap /dev/sda6 by 1GB
  8. Reboot to HDD -- success

I didn't take up the full 400GB (or 360GB +/-) because of my experience rooting my Android phone and the use of symbolic links to expand available space. I probably could have gone in and strategically started to set them up (actually, I already did this with the NTFS partition on the drive by mounting /ntfs to /(Root) and setting up Virtualbox /import directory as a Symbolic Link to /import on the NTFS partition, which allowed me to create an XP image from VMware vCenter). For the sake of time, I decided against it, for now, but left the option open of doing it in the future.


Jeremy Davis's picture

Sounds like a fair and reasonable way of acheiving your ends.

Also just looking over your screenshots again, it seems you didn't use LVM but instead installed direct to ext partitions. Not sure how I missed that initially. Obviously that makes my speil about LVM irrelevant.

Is there a reason why you chose not to use LVM? LVM is pretty damn cool IMO. I really like the snapshots feature; which can be taken of a live filesystem (like doing an image, but you can do it without rebooting). The other cool thing is the the filesystem can be expanded while running. So you can add extra harddrives or partitions to the root filesystem really easily, again; even while the system is running. It would've been the easiest way to go in your scenario IMO.

Anyway that's all irrelevant now. Hope to hear how you go installing your desktop etc and how it all turns out. Good luck

Drew Ruggles's picture

Specifically, on the use of the Debian Installer Live program.

I got to a point where it said I needed to Reboot, but have no documentation as to how to do that.



Jeremy Davis's picture

And then the machine should automatically reboot. I have never actually installed TKL to hardware so I'm not 100% sure how that works in practice, but when I install to KVM or other virtualisation platform I just hit <enter> repeatedly (with perhaps a <tab> or 2) and it all just does it itself.

If that's not working, then you could physcially reset it although that's probably not ideal.

Drew Ruggles's picture

I'm having a tough day... (or 2 weeks to be truthful). I'm trying to install a TKL appliance on bare metal and find the documentation to be lacking the forums difficult to parse information out of.

Why isn't the documentation a Wiki so users can commit their experiences and expetise to an easier to understand format?

Jeremy Davis's picture

The docs section of TKL (found here: is a wiki

PS I have to agree with you that the documentation is definately lacking and I think that the forums could be broken up a little more (ie more subsections) to make them a little more useful for browsing information. I have spoken to the core devs about this and they are reluctant to change things, and I see their point as far as posting goes (I hate those forums where you need to spend half an hour deciding which forum you should be posting in) but from the perspective of browsing to find info, the 2 sections suck IMO. Liraz added the tags feature which sort of helps, but still not really...

What are your thoughts on that?

Drew Ruggles's picture

My thoughts are that despite TKL being a collection of open source modules, it is a unique system in of itself and there exists no single source of comprehensive information to support that system.

It's not to be expected that all modules and their functionality be accommodated by a centralized documentation service -- though that sounds like an awesome business opportunity to me -- but there should be some standard process for integrating a module in a system. As an analogy, we don't expect Microsoft to have the user documentation on how to run and configure WinZip, but we do expect them to provide a standardized mechanism for installing and automatically configuring the system so WinZip works, providing the WinZip developers have been responsible in their adherence to the mechanisms as Microsoft defines.

However, when I run in to a problem with a TKL appliance -- despite the impression that TKL forums are my first stop -- I spend a fair amount of time googling the issue, looking at TKL docs, Webmin docs, Ubuntu docs and the module or application's docs before I post to the forum. The issue is usually a combination of these components, and thus, a TKL user wiki could document and address these system based issues and suggested fixes, whereas we would not expect to find that info at an individual module developer's website.

Another example: I maintain a very small TKL Drupal 6 CMS for a client. Updates to core Drupal and other modules are a different process from official Drupal documentation. I agree with the changes in process based on user rights makes for a more secure development platform. However, I've never seen those changes documented.

For a lot of admins with experience, using the varied *nix command line tools is part of the *nix-head collective consciousness, but for folks like me who don't have that experience, we'd like to have better information, specifically related to the process of integrating, upgrading, and maintaining system TKL functionality.

As you know I've been struggling with Vbox and even though I followed the instructions on the virtualbox download page, the information is not correct. The correct information is in the manual regarding the order that items need to be installed. Of course, that brings up another issue where Vbox is not directly supported on TKL appliances. That's why I think a user based wiki is a better format. I could write up my experience, have the group comment on it, and make it better. Examples and screen shots are especially helpful, if we coordinate with corresponding command line inputs. I'm seeing a whole lot of "I don't use Webmin, I only use the command line" but that ignores a valid user interface mechanism that ships with all TKL appliances.


Jeremy Davis's picture

And as I said the documentation is definately lacking. Ultimately the idea behind TKL is to lower the bar to entry into the wonderful world of free open source software, but lack of documentation is a serious sticking point.

And yes it'd be great if you wanted to help out and put some stuff together. There have been a number of good people who have put in a great effort and it all helps, but as you can see we've got a long way to go. And whilst it'd be great to have some better docs, it requires time and energy, and lots of it. Other than the 2 core devs (who AFAIK still have day jobs) everyone just volunteers (inc me) and does what they can. Other than trying to help in the forums there's the bug tracker and blueprints as well as building patches, creating ISOs and OVZ templates. For me I wish I had more time to do more, but as it is I could spend every spare minute working on TKL and still not do enough!

As for Webmin, I used it for a little while, when I first started with Linux a couple of years ago  (when I came across TKL) and it was  a useful place to start. But I've found that the commandline is quicker and easier (and easier to find relevant info via google). So when I say I don't use it much I don't mean to be snobby or anything, its just that whilst Webmin seems easier to start with (and less scarely when you're used to a GUI) I found that after I started to get my hands dirty the commandline is generally easier to use IMO (although as I've said I still use it for some stuff like Samba). Also when you're trying to help others it easier to give people a few lines of code to cut and paste, than a heap of convoluted list of menus and sub menus, espcially if you don't have a TKL system handy. Most commandline stuff can be double chekced easily via the net even when you don't have a TKL system handy.

SO bottom line is TKL needs lots of work and it all starts with all of us doing what we can. SO if you think you've got something to share, please do so! :)

Drew Ruggles's picture

In round 5 of my lengthy experiment of trying to install a TKL appliance on bare metal, I ran in to the same issue of having the system only be allocated 2GB+, and of course, copying over some ISO files for setting up a virtualbox machine killed that. Had to resize partitions. I really don't understand what's going on with the installer for these appliances. Why, when it has a 400GB ext4 partition, will it go off, create a new partition that is less than 3GB, and stick the whole system in it?

Anyhow, trying to fix it, and of course, the Grub Bootloader got hosed. Trying to install Boot-repair, and can't get it. Here's what I did:

1. From a terminal logged in as root:

add-apt-repository ppa:yannubuntu/boot-repair

Response: No such command "add-apt-repository"

2. Off to Ubuntu documentation... on Adding Launchpad PPA Repositories

3. Install python software properties, per documentation

apt-get install python-software-properties

Response: I think it installed, but still got the tklbam error

4. Try adding Boot-Repair to sources.list

root@antilles ~# add-apt-repository ppa:yannubuntu/boot-repair
could not open file '/etc/apt/sources.list'
could not open file '/etc/apt/sources.list'
could not open file '/etc/apt/sources.list'
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver --recv 3C48D16124B50277AF10D27F32B18A1260D8DA0B
gpg: requesting key 60D8DA0B from hkp server
gpg: key 60D8DA0B: public key "Launchpad PPA for YannUbuntu" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

I'm assuming that "could not open file '/etc/apt/sources.list'" means it didn't install or write to the sources.list, and a quick view of that proves to be correct. So now, why can't I just add it manually... oh, yeah, the documentation does not explicitly describe the format of the sources.list for the Launchpad PPA. They give an example of how to submit the command to edit the sources.list, but they lack the resulting text. (Perfect example of incomplete Ubuntu documentation)

Jeremy Davis's picture

If you edit your sources file with nano eg:

nano /etc/apt/sources.list.d/sources.list

Then add this line.

deb lucid main

If you go to the PPA page of the boot-repair app it's there (click "technical details about this PPA" and select Lucid from the drop down - the src line is for source code so you don't need that one).

Or alternatively you can add a new file like this (I like to do it that way because it makes it really easy to remove - just delete the file).

nano /etc/apt/sources.list.d/bootrepair.list

And to add the key to your keyring manually (the ppa-add command takes care of this step too):

apt-key adv --keyserver --recv-keys 1024R/60D8DA0B

(I haven't tested that in TKL but that's what it says to do, again on the PPA page - next to where it says "signing key" there is a link "what is this?" which open a help dialog that explains it all), I'd assume that it should work).

TBH I'm not sure why you're having so many issues. As I've said I've never installed to bare metal before but I assumed that it should have been as painless as installing to a VM (I use ISOs to install to KVM). But I have always just used the defaults, never customised it.

I suspect that the general intended installation would be to use the whole HDD for a bare metal install (much the same as I do with a VM install). So having the custom partitions may be what's causing the issues. Perhaps if you left the first partition on the HDD unformatted then TKL would then use all of that? If I get time perhaps I'll have a look at that and see how it goes...?

BTW that boot repair app looks quite cool but it's not that hard to repair grub2 from a live cd anyway IMO. I don't recall the exact commands but I've done it plenty of times and it's only a couple of lines of code. It's well documented on the Ubuntu wiki (or at least it was...)

Post new comment