summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/tree/etc/oem36
1 files changed, 29 insertions, 7 deletions
diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem
index fe8abac15..ea715aae2 100755
--- a/rescue/tree/etc/oem
+++ b/rescue/tree/etc/oem
@@ -2,6 +2,11 @@
[ "$1" = "-f" ] || { echo "Call it with option -f, but don't fear loosing all your data, this command is dangerous!"; exit 1; }
+inst=1
+swap=2
+root=3
+langs=fr:en
+
echo
echo
echo "I'm going to install the OEM version on your hard drive"
@@ -28,15 +33,32 @@ dd if=/etc/part_and_bootloader of=$hd
echo "Asking kernel to take into account this new partition table"
kernel_read_part $hd
-echo "Formatting (ext2) partition"
-mkfs.ext2 ${hd}1
+echo "Setting swap"
+mkswap $hd$swap
+swapon $hd$swap
+
+echo "Formatting $hd$inst partition" ; mkfs.ext2 $hd$inst
+echo "Formatting $hd$root partition" ; mkfs.ext2 $hd$root
-echo "Mounting partition"
-mkdir /hd ; mount -t ext2 ${hd}1 /hd
+echo "Mounting partitions"
+mkdir /hd ; mount -t ext2 $hd$inst /hd
+mkdir /mnt; mount -t ext2 $hd$root /mnt
-echo "Copying cdrom on hard drive"
-cp -a /boot /cdrom/boot /cdrom/Mandrake /hd
-rm /hd/Mandrake/mdkinst/usr/bin/runinstall2
+echo "Copying installation on hard drive"
+mkdir /hd/Mandrake
+cp -a /boot /cdrom/boot /hd
+cp -a /cdrom/Mandrake/mdkinst /hd/Mandrake
+
+echo "Installing packages"
+export DURING_INSTALL=1
+export RPM_INSTALL_LANG=$langs
+export SECURE_LEVEL=2
+for i in /var/lib/rpm /proc ; do mkdir -p /mnt$i; done
+mount -t proc proc /mnt/proc
+rpm --root /mnt --initdb
+for i in `perl -pe 's/ .*//' /cdrom/Mandrake/base/depslist.ordered`; do
+ rpm --root /mnt -ivh /cdrom/Mandrake/RPMS/$i.*.rpm --nodeps --force
+done
echo
echo "Done. OEM hard drive ready!"