4

I have a machine with 4 partitions:

  • sda1 - root
  • sda2 - swap
  • sda3 - tmp
  • sda4 - documents

When I run the installation I don't want to repartition the disk. Now I read on http://www.debian.org/releases/stable/i386/apbs01.html.en that it is not possible to use existing partitions. If I can't, what do I have to state in the preseed file if I want to keep the sda4 partition because it contains personal data of the users? Any ideas?

2 Answers 2

3

I had the same problem a while back and if you are also using the text based installer, look at my post in the forums.

This solution will not work with the graphical installer.

I explain how I managed to bypass partman during the installation by telling the installer to get a config file and my custom udeb that does the partitioning the way I want with only the disks I tell it to then continue with the rest of the installation.

In my case, one of the partitions is using LVM and the installer obtains the files from a usb disk. I think getting them from a web server should be possible without too much work.

Just make sure you to backup your data before trying any of this.

1

I take it from the following statement:

B.1.2. Limitations Although most questions used by debian-installer can be preseeded using this method, there are some notable exceptions. You must (re)partition an entire disk or use available free space on a disk; it is not possible to use existing partitions.

...that the the preseed cannot pass arguments to the advanced partitioner. In this case you would be better off just running the normal install from the LiveCD and when it asks how to install Ubuntu select "other" or "do something else". This will take you to the advanced partitioner where you can select the install paritition for / (root filesystem). If you don't do anything with the other partitions then the installer won't touch them - with the exception of swap. If you don't set up the swap partition I think it will get set up in fstab anyway.

If this is a one-of there's really no need to use a preseed file. Preseeding the installer is really for when you are doing many machines such as an Enterprise roll-out. If this really is an enterprise roll-out then you would need to delete the partition on each machine that the root filesystem is on, so that you can preseed the correct value to use only available space.

2
  • Thank you for the answer. I will use it on a larger number of pc's. It's not just in my personal context. Using the LiveCD or USB is unfortunately not applicable. I can't hardly believe that there is no way to keep a partition or skip the partitioning process. So the only way I see now is that I use a script to copy the data on sda4 to another place and copy it back after partitioning which is quite odd. Anybody another idea?
    – user92102
    Sep 23, 2012 at 11:02
  • No, as stated if you really have to do it this way, just remove the partition that the Ubuntu root files system is on. The preseed should then install to this free space. None of the other partitions should be affected. Sep 24, 2012 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .