LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 05-02-2012, 02:39 PM   #1
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Rep: Reputation: Disabled
Preseeding (Ubuntu Server 10.04-4 LTS x64) - Configuring Numerous Partitions Question


Hi all,

I'm attempting to create my first Ubuntu Server 10.04-4 LTS x64 preseed file and I'm afraid I can't figure out the hard drive partitioning aspect:

I have a 2TB hard disk that I need configured as follows (please note this system has hardware RAID that is already configured, so the OS install should merely see one large hard drive):

Partitions:
/ - 40 GB (ext4, must be bootable)
/swap - 32 GB
/local - all remaining free space (ext4)

The file systems need to be ext4 (with the exception of swap of course), and / must be bootable. I also need to use regular partitions rather than LVM. Also, I don't care about any data that's currently on the disk. I've been trying to cook something up via the examples on this page to no avail:

http://www.tylerlesmann.com/2008/jul/06/fun-preseed/

Any help is greatly appreciated (please note I'm incredibly new to *nix, so please handle with care)! =)

I found this example but am unsure how to modify it based on my stated requirements:
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
boot-root :: \
40 50 100 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
500 10000 1000000000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
64 512 300% linux-swap \
method{ swap } format{ } \
.

Thanks,
-Snipe
 
Old 05-03-2012, 07:37 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
At first, if you set d-i partman-auto/choose_recipe select atomic tghe installer will not use your recipe, so comment that out.

To your actual recipe, corrected with the sizes you want:
Code:
boot-root :: \
40000 50 41000 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
500 10000 1000000000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /local } \
. \
32000 512 33000 linux-swap \
method{ swap } format{ } \
.
I have changed the mount-points and the sizes for the partitions. Note that it is not possible to give exact sizes to the installer with preseeding, so your /-partition is set to be anywhere between 40000MB and 41000MB and your swap will be anywhere between 32000MB and 33000MB. The rest of the disk will be partitioned and mounted as /local.
 
Old 05-03-2012, 01:09 PM   #3
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thank you Tobi!

You rock Tobi! Thank you so much for not only providing the recipe, but for the included explanation! I'm going to analyze what you posted so I can learn from it, and will get the recipe integrated into my preseed file. I must admit I was most confused by the 3 sets of numbers for each partition.

Much thanks,
-Snipe
 
Old 05-03-2012, 02:41 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
The numbers are pretty easy explained: The first and the last are the minimum and maximum size, the second is the priority. Higher priorities tend to the maximum size, smaller priorites to the minimum size.
Please note that I have recited this more or less from memory and it is a long time ago that I have done this, so please test that first, before using it in a production environment.
 
Old 05-03-2012, 04:51 PM   #5
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
Hmm?

I successfully installed Ubuntu via your preseed partition modifications, and after the OS booted I ran the following command:

sudo fdisk -l /dev/sda

It produced the following output:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4864 39061504 83 Linux
/dev/sda2 4864 243134 1913908225 5 Extended
/dev/sda5 4864 239244 1882658816 83 Linux
/dev/sda6 239244 243134 31248384 82 Linux swap / Solaris

I'm confused as to why I'm seeing 4 partitions rather than 3 (and by the fact that both of the partitions begin at the same starting block). I also tried going into my RAID controller and performed a "Fast Initialization," with the thought that there may be some sort of residual partition the preseed file wasn't properly handling, and it produced the same results as above. Is this output appropriate, and if not what in the heck is wrong?

Thanks,
-Snipe

---------- Post added 05-03-12 at 02:52 PM ----------

Ugh, that didn't paste well. Please let me know if you're not able to decipher my above post.

Thanks,
-Snipe
 
Old 05-03-2012, 05:01 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
There is no problem at all. The second partition (/dev/sda2) is an extended partition, which is nothing more than a container. It's purpose is to break up with some limits of the old (DOS-inherited) PC partition tables. In your case it contains the logical partitions /dev/sda5 and /dev/sda6 (therefore the overlapping). This is a standard behavior of the installer. If you don't want this behavior and want the partitions to be primary (instead of being logical partitions) use the $primary{ } keyword in their part of the recipe, too.
 
Old 05-03-2012, 05:29 PM   #7
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
Excellent, thank you for the detailed explanation! =)

-Snipe
 
Old 05-07-2012, 02:51 PM   #8
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
Hi Tobi,

I ran into a problem with adding $primary{ }. The partitioner now barfs, stating "You have not selected any partitions for use as swap space." Here is the recipe I'm using:

Code:
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              40000 50 41000 ext4                             \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .                                               \
              500 10000 1000000000 ext4                       \
                      $primary{ } method{ format }            \
                      format{ } use_filesystem{ }             \
                      filesystem{ ext4 } mountpoint{ /local } \                 
              .                                               \
              32000 512 33000 linux-swap                      \
                      method{ swap } format{ }                \
              .
I also tried adding $primary{ } to the linux-swap partition ($primary{ } method{ swap } format{ }.) and the error message still pops up. Any idea as to what I'm doing wrong? Is my formatting incorrect?

Thanks,
-Snipe
 
Old 05-07-2012, 03:11 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Do you have copied this directly from your preseed file with copy&paste into the forums textbox?
When I mark your code with the mouse I can see spaces after the backslash in the line
Code:
                      filesystem{ ext4 } mountpoint{ /local } \.................
I have replaced them here with red dots, so that you can see them. This will end the recipe at that point. In fact I wonder why the installer isn't complaining about a malformed recipe. remove those spaces.

Other than that I can see nothing wrong with that recipe.
 
Old 05-07-2012, 03:35 PM   #10
Sniperm4n
LQ Newbie
 
Registered: May 2012
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks!

Thank you for the lesson in formatting, removing the excess spaces resolved the issue! =)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Server 10.04-4 LTS x64 English Language Pack Full Support Preseed Problem Sniperm4n Ubuntu 3 05-04-2012 12:17 PM
Ubuntu LTS Server login question MarkoSan Linux - Software 3 09-23-2010 02:16 PM
LXer: The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server) LXer Syndicated Linux News 0 04-27-2008 06:50 AM
Ubuntu 6.06 LTS and Mail Server wh33t Linux - Server 4 11-16-2007 08:46 PM
Configuring numerous OOo clients Centaur81 Linux - Software 1 08-11-2003 08:01 AM


All times are GMT -5. The time now is 03:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration