#!/bin/bash echo 0 >| /proc/sys/kernel/randomize_va_space # mkfs.ext4 -L archlinux /dev/sda6 # mount /dev/sda6 /mnt/custom ROOT=/mnt/custom cd /tmp/ wget -c http://ebalaskas.gr/img/pacman.static-4.0.2.xz xz -d pacman.static-4.0.2.xz chmod u+x pacman.static-4.0.2 cat > /tmp/pacman.conf << EOF [options] HoldPkg = pacman glibc SyncFirst = pacman Architecture = auto [core] Include = /tmp/mirrorlist [extra] Include = /tmp/mirrorlist [community] Include = /tmp/mirrorlist EOF echo "Server = http://ftp.otenet.gr/linux/archlinux/\$repo/os/\$arch" > /tmp/mirrorlist mkdir -pv $ROOT/var/log mkdir -pv $ROOT/var/lib/pacman mkdir -pv $ROOT/var/cache/pacman/pkg /tmp/pacman.static-4.0.2 \ --config /tmp/pacman.conf \ --cachedir $ROOT/var/cache/pacman/pkg \ --dbpath $ROOT/var/lib/pacman \ --force --noconfirm -v \ --logfile $ROOT/var/log/pacman.log \ --root $ROOT \ -Sy base mount --bind /dev/ $ROOT/dev mount --bind /proc/ $ROOT/proc mount --bind /sys/ $ROOT/sys echo vim $ROOT/boot/grub/menu.lst echo grub-install --root-directory=$ROOT /dev/sda
eg. menu.lst
# (0) Arch Linux title Arch Linux [/boot/vmlinuz26] root (hd0,5) kernel /vmlinuz26 root=/dev/sda6 ro initrd /kernel26.img # (1) Windows title Windows rootnoverify (hd0,0) makeactive chainloader +1