summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-16 14:53:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-16 14:53:23 +0000
commit895a5aaf63e3a58035ebcb767569dc4be659b2a4 (patch)
tree6e2fb7e906bed5bc19e2e69303d680bcbdd0eb77
parent67e24686bfdde2fdf41b5632f9f5bb9731546a6f (diff)
downloadalpine-conf-895a5aaf63e3a58035ebcb767569dc4be659b2a4.zip
setup-disk: add pax_nouderef boot param to vmware guests
-rw-r--r--setup-disk.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/setup-disk.in b/setup-disk.in
index fc7efd4..a957b09 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -23,6 +23,11 @@ enumerate_fstab() {
sed "s:$mnt:/:g; s: :\t:g" | sed 's:/\+:/:g'
}
+is_vmware() {
+ grep -q VMware /proc/scsi/scsi 2>/dev/null \
+ || grep -q VMware /proc/ide/hd*/model 2>/dev/null
+}
+
install_mounted_root() {
local mnt="$1"
local features="ata base bootchart cdrom ext2 ext3 ide scsi usb"
@@ -71,6 +76,12 @@ install_mounted_root() {
ln -s boot/grsec.gz "$mnt"/grsec.gz
ln -s boot/grsec "$mnt"/grsec
+ if is_vmware; then
+ pax_nouderef="pax_nouderef "
+ else
+ pax_nouderef=
+ fi
+
# create an extlinux.conf
cat >"$mnt"/boot/extlinux.conf <<EOF
timeout 20
@@ -78,7 +89,7 @@ prompt 1
default grsec
label grsec
kernel /grsec
- append initrd=/grsec.gz root=$rootdev modules=sd-mod,usb-storage,ext3$raidmod quiet
+ append initrd=/grsec.gz root=$rootdev modules=sd-mod,usb-storage,ext3$raidmod ${pax_nouderef}quiet
EOF
# fix the fstab
enumerate_fstab "$mnt" >> "$mnt"/etc/fstab