Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

lglive-installer.sh: Improving user feedback

  • Loading branch information...
commit df6605ac17c6dd9b3a5858ba9a2cbc287fcd0a60 1 parent 16d41e9
@svenstaro authored
Showing with 33 additions and 10 deletions.
  1. +33 −10 overlay/opt/bin/lglive-installer.sh
View
43 overlay/opt/bin/lglive-installer.sh
@@ -23,55 +23,77 @@ select_device() {
autopart() {
(
- # create partition table
+ echo "# Creating partition table"
parted -s $DEVICE mklabel msdos
+ echo "10"
+ sleep 2
- # create boot partition
+ echo "# Creating boot partition"
parted -s $DEVICE mkpart primary 1 100
parted -s $DEVICE set 1 boot on
+ echo "20"
sleep 2
mkfs.ext2 -L boot-lglive ${DEVICE}1
+ echo "30"
+ sleep 2
- # create swap partition
+ echo "# Creating swap partition"
parted -s $DEVICE mkpart primary 100 612
+ echo "40"
sleep 2
mkswap -L swap-lglive ${DEVICE}2
swapon -L swap-lglive
+ echo "50"
+ sleep 2
- # create root partition
+ echo "# Creating root partition"
parted -s $DEVICE mkpart primary 612 100%
+ echo "60"
sleep 2
mkfs.ext4 -L root-lglive ${DEVICE}3
- ) | zenity --progress --title "Installation" --text="Partitioning" --auto-close --no-cancel --pulsate
+ echo "70"
+ sleep 2
+ echo "100"
+ ) | zenity --progress --title "Installation" --text="Partitioning" --auto-close --no-cancel --percentage=0
}
copy_files() {
(
- # copy boot files
+ echo "# Copying boot partition files"
mkdir /mnt/boot-lglive/
mount -L boot-lglive /mnt/boot-lglive/
+ echo "10"
+
cp -a /bootmnt/lglive/boot/* /mnt/boot-lglive/
cp -a /bootmnt/syslinux /mnt/boot-lglive/
+ echo "20"
- # copy root files
+ echo "# Copying root partition files"
mkdir /mnt/root-lglive/
mount -L root-lglive /mnt/root-lglive/
+ echo "30"
+
cp -a /bin /etc /gamelist_* /home /lib /opt /root /run /sbin /srv /usr /var /mnt/root-lglive/
mkdir /mnt/root-lglive/{dev,sys,proc,media,mnt,tmp,boot}
chmod 777 /mnt/root-lglive/tmp/
mount --bind /mnt/root-lglive/tmp /tmp
- ) | zenity --progress --title "Installation" --text="Copying files" --auto-close --no-cancel --pulsate
+ echo "100"
+ ) | zenity --progress --title "Installation" --text="Copying files" --auto-close --no-cancel --percentage=0
}
install_bootloader() {
(
+ echo "# Writing master boot record"
cat /usr/lib/syslinux/mbr.bin > $DEVICE
+ echo "10"
+ echo "# Installing bootloader"
sed -i 's|/lglive/boot|..|g' /mnt/boot-lglive/syslinux/syslinux.cfg
extlinux --install /mnt/boot-lglive/syslinux
sed -i 's|APPEND initrd|APPEND root=/dev/disk/by-label/root-lglive initrd|g' /mnt/boot-lglive/syslinux/syslinux.cfg
+ echo "20"
- # bake kernel
+ echo "# Baking kernel"
sed -i 's|HOOKS.*|HOOKS="base udev pata scsi sata resume filesystems"|g' /etc/mkinitcpio.conf
sed -i 's|kernel26\.img|lglive.img|g' /etc/mkinitcpio.d/kernel26.preset
sed -i 's|PRESETS.*|PRESETS=("default")|g' /etc/mkinitcpio.d/kernel26.preset
@@ -79,7 +101,8 @@ install_bootloader() {
mount --bind /mnt/boot-lglive /boot
mkinitcpio -p kernel26
- ) | zenity --progress --title "Installation" --text="Installing bootloader" --auto-close --no-cancel --pulsate
+ echo "100"
+ ) | zenity --progress --title "Installation" --text="Installing bootloader" --auto-close --no-cancel --percentage=0
}
echo ":: Device selection"
Please sign in to comment.
Something went wrong with that request. Please try again.