Skip to content
Snippets Groups Projects
Commit 2c478736 authored by Daniel Schulte's avatar Daniel Schulte
Browse files

Moved some files, added grub24dos, added mops-stop script and tools

parent 0b97da5e
No related branches found
No related tags found
No related merge requests found
function set64 {
set iso="ubuntu-12.04-desktop-amd64.iso"
set isoinitrd=""
set bits="64"
set altbits="32"
}
function set32 {
set iso=""
set isoinitrd=""
set bits="32"
set altbits="64"
}
function guesscpu {
if cpuid -l
then
echo "Dein System scheint ein 64-bit System zu sein."
set64
else
echo "Dein System scheint ein 32-bit System zu sein."
set32
fi
echo "Die weiseste Wahl sollte $bits bits mit $iso und $isoinitrd zu sein"
echo
}
#elif is not working in this grub version !?!
if test -z $bits
then
guesscpu
else
if test 64 == $bits
then
set64
else
set32
fi
fi
# Set up a loop device and start a Debian style Casper Live CD from it.
function LoadCasperLoop {
if test -z "${isodev}"
then
search -f -s isodev /${iso}
echo "Found ${iso} on (${isodev})"
echo ""
fi
if test -z "${initrd}"
then
set initrd="(loop)/casper/initrd.lz"
fi
loopback loop (${isodev})/${iso}
echo "Loading kernel (takes up to 2 minutes)"
echo ""
echo "Hint: You may need to mount the USB stick on /isodevice by hand !"
echo " Or you may need to run this:"
echo " . /scripts/casper-helpers"
echo " find_cow_device ${iso}"
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/$iso file=/cdrom/preseed/ubuntu.seed ${localeinfo} nosplash verbose --
echo "Loading initrd from iso (takes up to 5 minutes)"
initrd "${initrd}"
echo "Starting kernel"
}
#TODO: ist $root immer automatisch richtig gesetzt ?
# Man koennte search -l "Label-des-FAT32-auf-dem-Usbstick" benutzen.
# Man Kann auch 'search -f -s isodev /$iso' verwenden um das grub-device zu bekommen, auf dem $iso liegt. Man beachte dabei den absoluten Pfad mit / am Anfang! Das Ergebnis wird (falls gefunden) in der Variable $isodev abgelegt. z.b. $isodev=hd0,1
#TODO: Suche Loesung um die UUID des FAT32 an das bootende .iso weiterzugeben
menuentry "Empfohlen: Boot Ubuntu 11.10 ${bits}bit Live ISO by UUID" {
loopback loop ($root)/$iso
echo "Loading ${bits}bit kernel (takes up to 2 minutes)"
linux (loop)/casper/vmlinuz boot=casper iso-scan/uuid=C3E9-0499 iso-scan/filename=/$iso file=(loop)/preseed/ubuntu.seed --
echo "Loading ${bits}bit initrd (takes up to 5 minutes)"
initrd ($root)/$isoinitrd
echo "Starting ${bits}bit kernel"
}
menuentry "======== Bei Auswahl ab hier unbedingt Helfer hinzuziehen =======" {
#echo "Hier ist nichts. Gehen sie weiter."
set gameroot=(${root})/boot/game
export gameroot
configfile ${gameroot}/game.cfg
}
menuentry "Ubuntu 12.04 AMD64 vanilla" {
set64
set isodev=${root}
LoadCasperLoop
}
menuentry "Ubuntu 12.04 AMD64 LIP WS1213 Custom" {
set iso="ubuntu-12.04-lipws1213-amd64.iso"
set localeinfo=""
LoadCasperLoop
}
menuentry "Ubuntu 12.04 AMD64 LIP WS1213 Custom DE 2.7.2" {
set iso="ubuntu-12.04-lipws1213-amd64-v2.7.2.iso"
set localeinfo="debian-installer/locale=de_DE console-setup/layoutcode=de"
set initrd="/initrd2.lz"
LoadCasperLoop
}
menuentry "Ubuntu 12.04 AMD64 LIP WS1213 Custom DE" {
set iso="ubuntu-12.04-lipws1213-amd64.iso"
set localeinfo="debian-installer/locale=de_DE console-setup/layoutcode=de"
LoadCasperLoop
}
menuentry "Ubuntu 12.04 x86 LIP WS1213 Custom DE" {
set iso="LIPiso32bit-v2.iso"
set localeinfo="debian-installer/locale=de_DE console-setup/layoutcode=de"
LoadCasperLoop
}
menuentry "Ubuntu 12.04 AMD64 LIP WS1213 Custom Chainload" {
set iso="ubuntu-12.04-lipws1213-amd64.iso"
set isohd=(hd0,2)
loopback loop $isohd/$iso
set root=(loop)
export root
set iso_path="${iso}"
export iso_path
configfile /boot/grub/grub.cfg
}
menuentry "Helfermenu. Nur Nach Ruecksprache mit einem Install-Helfer benutzen." {
export bits
set autobits=${bits}
export autobits
configfile ${prefix}/helfer.cfg
}
#
# This grub.cfg file was generated by grub24dos.exe
#
# The grub menu type is - Scroll bar and progress circle
#
echo The Windows boot address is $winboot
#
# The grub2 default boot OS is menuentry 2 - Ubuntu
# The grub2 default timeout is 10 seconds
#
set default=2
set timeout=10
set pager=1
set gfxmode=1024x768
set grub24dos_parm=ascrollcir
set theme=$prefix/themes/grub24dos/theme.ascrollcir.txt
set locale_dir=$prefix/locale
set lang=en
insmod png
if loadfont $prefix/fonts/unicode.pf2 ; then
insmod vbe
insmod vga
insmod gfxterm
fi
terminal_output gfxterm
insmod gfxmenu
# start-user-section ********************************************************
#
insmod ldm
insmod lvm
set root=(lvm/linux-root)
configfile /boot/grub/grub.cfg
menuentry "Load ubuntu grub.cfg" {
insmod ldm
insmod lvm
set root=(lvm/linux-root)
configfile /boot/grub/grub.cfg
}
menuentry "Ubuntu" --class ubuntu {
insmod ldm
insmod lvm
set root=(lvm/linux-root)
linux /vmlinuz root=/dev/mapper/linux-root
initrd /initrd.img
}
menuentry "Ubuntu (Rescue)" --class ubuntu {
insmod ldm
insmod lvm
set root=(lvm/linux-root)
linux /vmlinuz root=/dev/mapper/linux-root init=/bin/bb
initrd /initrd.img
}
#
# end-user-section ********************************************************
File added
#!/bin/sh
PREREQ=""
DESCRIPTION="Enforcing MoPS disconnect"
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
. /scripts/casper-functions
load_confmodule
log_begin_msg "$DESCRIPTION"
# Starting nmtelekinese with the MoPS network
cp /nm/nmtelekinese.py /root/usr/bin/
chroot /root mkdir -m 755 -p /home/${USERNAME}/.config/autostart
cp /nm/nmtelekinese.desktop /root/home/${USERNAME}/.config/autostart
chroot /root chmod 755 /home/${USERNAME}/.config/autostart/nmtelekinese.desktop
chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config
# Denying all connections to redirector.wlan.rwth-aachen.de
mount -t proc none /root/proc
chroot /root modprobe ip_tables
chroot /root modprobe iptable_filter
chroot /root modprobe ipt_REJECT
chroot /root iptables -I OUTPUT 1 -d 137.226.8.34 -j REJECT --reject-with icmp-host-prohibited
chroot /root iptables -I OUTPUT 1 -d 137.226.8.34 -p tcp -j REJECT --reject-with tcp-rst
umount /root/proc
log_end_msg
/scripts/casper-bottom/01integrity_check
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/05mountpoints
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/05mountpoints_lupin
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/07remove_oem_config
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/10custom_installation
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/10ntfs_3g
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/12fstab
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/13swap
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/14locales
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/15autologin
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/18hostname
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/19keyboard
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/20xconfig
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/22gnome_panel_data
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/22screensaver
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/22serialtty
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/22sslcert
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/23etc_modules
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/23networking
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/24preseed
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/25adduser
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/25configure_init
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/26disable_user_menu
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/26mopsmops
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/30accessibility
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/31disable_update_notifier
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/32disable_hibernation
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/33enable_apport_crashes
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/34disable_kde_services
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/35fix_language_selector
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/36disable_trackerd
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/40install_driver_updates
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/41apt_cdrom
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/43disable_updateinitramfs
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/44pk_allow_ubuntu
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/45jackd2
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/48kubuntu_disable_restart_notifications
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/49kubuntu_mobile_session
[ -e /conf/param.conf ] && . /conf/param.conf
/scripts/casper-bottom/50ubiquity-bluetooth-agent
[ -e /conf/param.conf ] && . /conf/param.conf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment