Disk partitioning with pre script !!
Hello List, Could someone please suggets any process to partition the disk probably using pre scripts or any other method in SLES9. I have a requirement to create swap which should be either equal or twice the RAM. Thanks, Ajay
In my autoyast configuration I have the following: <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> ... <install> <partitioning config:type="list"> <drive> <use>all</use> </drive> </partitioning> ... This creates a swap and root partition in wathever disk I have (SCSI, IDE, etc.) On 10/7/05, Ajay Mulwani <ajaymulwani@gmail.com> wrote:
Hello List, Could someone please suggets any process to partition the disk probably using pre scripts or any other method in SLES9. I have a requirement to create swap which should be either equal or twice the RAM. Thanks, Ajay
Hi Ajay, the problem is that a change of the partition table is not recognized by autoyast when done in a pre-script. furthermore you need to format the new slizes and put a few files on the pre-partitioned disk. i did the following to get it done (partition layout is read from an external config file on nfs): - erase all possible old partitions on the target disk (echo d'\n'1'\n'd'\n'2'\n'd'\n'3'\n'd'\n'4'\n'w'\n' | fdisk \ /dev/target-disk ) - build the new layot the same way as deleting (i.q. echo -e 'n\np\n2\n\n+300MB\nt\n2\n82\nw\n' |fdisk ... for a 300MB swappartition) - format you file systems - mkdir needed mountpoints (minimum you need /etc and /bin [see later why]) - produce a fstab file with you layout on your target - cp /bin/bash to the /bin of your new /bin on disk - produce a /etc/SuSE-release file with the version information you get from the content file on the install media - bash-architectur, /etc/SuSE-release and /etc/fstab are checked by auto- yast later - put some flagfile on the new filesystem to be recognized by your script that it is prepared and doesn't need to be partitioned again - reboot the box - pre-script restarts, recognizes the i'm-ready-partitioned flag and just exits -> yast checks the disk for 'former' installation -> finds your new layout with the needed files -> formats it again and starts installation HTH Boris ps.: assuming you use the following in you xml-file for autoyast: <partitioning_advanced> <fstab> <use_existing_fstab config:type="boolean">true</use_existing_fstab> <partitions config:type="list"> <partition> <format config:type="boolean">false</format> </partition> </partitions> </fstab> </partitioning_advanced>
--- Ursprüngliche Nachricht --- Von: Ajay Mulwani <ajaymulwani@gmail.com> An: suse-autoinstall@suse.com Betreff: [suse-autoinstall] Disk partitioning with pre script !! Datum: Fri, 7 Oct 2005 17:37:51 +0530
Hello List, Could someone please suggets any process to partition the disk probably using pre scripts or any other method in SLES9. I have a requirement to create swap which should be either equal or twice the RAM. Thanks, Ajay
-- NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.* Für DSL-Nutzer. Ohne Providerwechsel! http://www.gmx.net/de/go/telefonie
Thanks Boris. However the solution that you have suggested will probably create a fixed size swap partition (300 MB in the example that you have mentioned). What I am looking for a swap partition depending on the RAM size i.e. if RAM is 256MB swap should be 512MB, if RAM is 512MB swap should be 1GB etc... Regards, Ajay
participants (3)
-
Ajay Mulwani
-
boris.kornder@gmx.net
-
Darío Mariani