Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + manual
- + '[' 0 '!=' 0 ']'
- + run_as_root
- +++ dirname ./myliveusb-yad
- ++ cd .
- ++ pwd
- + this_script_dir=/home/tex/Downloads
- ++ basename ./myliveusb-yad
- + this_script=myliveusb-yad
- + this_script_path_n_name=/home/tex/Downloads/myliveusb-yad
- ++ which kdesu
- + GUI_SU=/usr/bin/kdesu
- + '[' 0 '!=' 0 ']'
- + usb_install
- + set_variables
- + STANDARD=
- + COPY2RAM=
- + PERSIST=
- + INSTALL=
- + DeBug=
- + DEVICE=
- + DRIVES1=
- + DRIVES2=
- + Part_Num=
- + ISO_FILE=
- + JOB=
- + LABEL=LIVE_PCLinuxOS
- + ADD=
- + LIVE=
- + Mnt_Pnt=/media/MyLiveUSB.15620
- + NAME=
- + SIZE1=
- + SIZE2=
- + Target_Part=
- + Type=
- + isolin2=
- + isolin_full=
- + isolin_path=
- + mypid=3824
- + sqfs2=
- + sqfs_dir=
- + sqfs_full=
- + sqfs_name=
- + efi_Part=
- + efi_Mnt=/media/MyLiveUSB.23721
- + get_device
- + yad --center --window-icon=/usr/share/icons/myliveusb.png --question '--button=Quit the Application:1' '--button=USB Device is NOT Inserted:0' --width=650 --no-wrap '--title= MyLiveUSB v.2 ' '--text=
- <b>Deciding on the Install Device</b>
- Please ensure that the device you intend to use
- is <span color='\''red'\''><b>NOT</b></span> plugged in, else
- withdraw it now and wait a few seconds before selecting <span color='\''blue'\''><b>Yes</b></span> below.
- You must ensure you do not plug in or withdraw any device other than the
- one intended for the OS, while this application is running.
- Are you ready to proceed with the LiveUSB install?
- Selecting <span color='\''red'\''><b>No</b></span> will exit the application.
- ' 0
- + '[' 0 '!=' 0 ']'
- ++ lsblk -n -o TYPE,NAME
- ++ grep disk
- ++ tr -s ' '
- ++ cut -d ' ' -f2
- ++ sed 's|sd|/dev/sd|g'
- + DRIVES1='/dev/sda
- /dev/sdb
- /dev/sdc
- nvme0n1'
- + yad --center --center--window-icon=/usr/share/icons/myliveusb.png --question '--button=Quit the Application:1' '--button=USB Device IS Inserted:0' --width=550 '--title=MyLiveUSB v.2' '--text=
- <b> Plug in your USB flash stick now </b>
- Please insert it now and select the appropriate button below.' 0
- + '[' 0 '!=' 0 ']'
- + echo
- + sleep 10
- + yad --center --window-icon=/usr/share/icons/myliveusb.png --progress --pulsate '--title= MyLiveUSB v.2 ' '--text=
- <b>DEVICE DETECTION</b>
- Your Inserted device is being detected
- This will take just a few moments.
- Do <span color='\''red'\''><b>NOT</b></span> attempt to view its contents while running this application.
- ' --auto-close --auto-kill
- ++ lsblk -n -o TYPE,NAME
- ++ grep disk
- ++ tr -s ' '
- ++ cut -d ' ' -f2
- ++ sed 's|sd|/dev/sd|g'
- + DRIVES2='/dev/sda
- /dev/sdb
- /dev/sdc
- /dev/sdd
- nvme0n1'
- ++ echo /dev/sda /dev/sdb /dev/sdc /dev/sdd nvme0n1
- + for file in $(echo $DRIVES2)
- ++ grep -v /dev/sda
- ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
- ++ head -1
- + tmpstr=
- + '[' '' '!=' '' ']'
- + for file in $(echo $DRIVES2)
- ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
- ++ grep -v /dev/sdb
- ++ head -1
- + tmpstr=
- + '[' '' '!=' '' ']'
- + for file in $(echo $DRIVES2)
- ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
- ++ grep -v /dev/sdc
- ++ head -1
- + tmpstr=
- + '[' '' '!=' '' ']'
- + for file in $(echo $DRIVES2)
- ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
- ++ grep -v /dev/sdd
- ++ head -1
- + tmpstr='/dev/sda /dev/sdb /dev/sdc nvme0n1'
- + '[' '/dev/sda /dev/sdb /dev/sdc nvme0n1' '!=' '' ']'
- + DEVICE='/dev/sdd '
- + for file in $(echo $DRIVES2)
- ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
- ++ grep -v nvme0n1
- ++ head -1
- + tmpstr=
- + '[' '' '!=' '' ']'
- + '[' '/dev/sdd ' == '' ']'
- + '[' '' = '' ']'
- ++ lsblk -l -o FSTYPE,NAME,SIZE,LABEL /dev/sdd
- ++ grep sd
- ++ grep ext
- ++ tr -s ' '
- ++ cut -d ' ' -f2,3,4
- ++ tr -t ' ' '\n'
- ++ sed 's|sd|/dev/sd|g'
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --button=Quit:1 --button=OK:0 --ellipsize=end '--title= MyLiveUSB v.2' '--text= \n <b>Only suitable <span color='\''blue'\''><b>Linux</b></span> Partitions are listed</b> \n\n <span color='\''blue'\''><b>Highlight</b></span> your selection and select <span color='\''blue'\''><b>OK</b></span> \n\n If there is no partition listed then please check \n\n the partition types on your media. \n\n Select <span color='\''red'\''><b>Quit</b></span> to quit the application \n ' --width=500 --height=400 '--column=Device Partition ' '--column= Partition Size ' '--column= Partition Label '
- + Target_Part='/dev/sdd3|14.6G||'
- + '[' 0 = 1 ']'
- + '[' '/dev/sdd3|14.6G||' = '' ']'
- ++ echo '/dev/sdd3|14.6G||'
- ++ cut -d '|' -f1
- + Target_Part=/dev/sdd3
- + echo /dev/sdd3
- /dev/sdd3
- + umount /dev/sdd3
- umount: /dev/sdd3: not mounted.
- ++ echo /dev/sdd3
- ++ cut -c9-10
- + Part_Num=3
- + get_device_type
- + DOS=
- + GPT=
- ++ fdisk -l /dev/sdd
- ++ grep dos
- ++ sed 's| ||g'
- ++ cut -d : -f2
- + DOS=
- ++ fdisk -l /dev/sdd
- ++ grep gpt
- ++ sed 's| ||g'
- ++ cut -d : -f2
- + GPT=gpt
- + create_mounts
- + mkdir /media/MyLiveUSB.23721
- + mkdir /media/MyLiveUSB.15620
- + write_label
- ++ e2label /dev/sdd3
- + LABEL_Exist=
- + '[' 0 '!=' 0 ']'
- + get_uuid
- ++ lsblk -l -n -o UUID /dev/sdd3
- + PART_UUID=ad5e1a19-45e6-4786-b120-01441110f9c7
- + '[' ad5e1a19-45e6-4786-b120-01441110f9c7 == '' ']'
- + get_job_yad
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --radiolist '--button=Quit the application:1' '--button=Accept your Choice:0' '--title= MyLiveUSB v.2 ' '--text= <b>Select the Action You Wish to Perform</b> \n Please select the action which you wish to perform from the list below
- ' --height=320 --width=350 --hide-column=2 --print-column=2 --column Select --column ' Option ' --column ' - Job Type - ' FALSE 1 'Create an initial Live OS on an USB stick.
- This option deletes all existing files on the selected partition.' TRUE 2 '
- Add a second or subsequent OS to an USB stick partition
- ' FALSE 3 '
- Exit this utility
- '
- + JOB='1|'
- ++ echo '1|'
- ++ cut -d '|' -f1
- + JOB=1
- + '[' 1 == 1 ']'
- + ADD=no
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --radiolist '--button=Quit the application:1' '--button=Accept your Choice:0' '--title= MyLiveUSB v.2 ' '--text= <b>Select the Action You Wish to Perform</b> \n Please select the action which you wish to perform from the list below
- ' --height=280 --width=350 --hide-column=2 --print-column=2 --column Select --column ' Option ' --column ' - Job Type - ' TRUE 1 'Use an ISO file as the source of your install.
- ' FALSE 2 'Use the files from a Live Media or an extracted ISO on HDD as the source.
- ' FALSE 3 'Exit this utility.
- '
- + JOB='1|'
- ++ echo '1|'
- ++ cut -d '|' -f1
- + JOB=1
- + '[' 1 == 1 ']'
- + LIVE=no
- + mount_part
- + mount /dev/sdd3 /media/MyLiveUSB.15620
- + '[' 0 '!=' 0 ']'
- + get_name
- + [[ ! '' =~ [a-zA-Z0-9] ]]
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --height=420 --width=460 '--title= MyLiveUSB v.2' '--text=
- <b>Select the OS NAME</b>
- Please ensure you do not select a
- name already in use on the device.
- Highlight a name and select <span color='\''blue'\''><b>OK</b></span> to accept it.' --editable --column ' - Suggested Names -
- Click an entry a second time to edit it.
- Press Enter to apply your edit.
- The name must contain one letter or number.' Mate. KDE. LXDE. Xfce. 'Click Twice to Edit'
- + NAME='KDE.|'
- ++ echo 'KDE.|'
- ++ tr ' ' _
- ++ cut -d '|' -f1
- + NAME=KDE.
- + '[' 0 '!=' 0 ']'
- + '[' KDE. = '' ']'
- + '[' no = yes ']'
- + [[ ! KDE. =~ [a-zA-Z0-9] ]]
- + '[' no '!=' yes ']'
- + get_iso
- + yad --center --window-icon=/usr/share/icons/myliveusb.png --info --button=OK:1 --timeout 5 --title 'MyLiveUSB v.2 ' '--text= \n <b>To select the ISO to be Used </b> \n\n At the following prompt please navigate to, and select the ISO you wish to use for this install \n '
- + ISO_FILE=
- + extension=
- + '[' '' '!=' iso ']'
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --file-selection --button=Select:0 --button=QuitApplication:2 --file-filter '*.iso' --title ' MyLiveUSB v.2 '
- Error creating proxy: The connection is closed (g-io-error-quark, 18)
- Error creating proxy: The connection is closed (g-io-error-quark, 18)
- Error creating proxy: The connection is closed (g-io-error-quark, 18)
- Error creating proxy: The connection is closed (g-io-error-quark, 18)
- + ISO_FILE=/mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
- + '[' 0 = 2 ']'
- + echo /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
- /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
- ++ echo iso
- + extension=iso
- + echo 'Extension is iso'
- Extension is iso
- + '[' iso '!=' iso ']'
- + echo
- + sleep 3
- + yad --center --window-icon=/usr/share/icons/myliveusb.png --progress --pulsate '--title= MyLiveUSB v.2 ' '--text=
- <b>Creating the Operating System on the Device</b>
- This is a visual indication that the script is working. It continues in the background during operation.
- Some operations such as wiping and copying files to the partition may take a <i><b>very</b></i> long time.
- The speed of completion depends on the size of the OS to be installed and also on the speed of the device in use.
- Good Luck!
- ' --auto-close --auto-kill
- + '[' no = yes ']'
- + '[' no '!=' yes ']'
- + wipe_part
- + rm -rf /media/MyLiveUSB.15620/lost+found
- ++ fdisk -l /dev/sdd -o Device,Type
- ++ grep EFI
- ++ tr -s ' '
- ++ cut -d ' ' -f1
- + efi_wipe=
- + '[' '' '!=' '' ']'
- + '[' no '!=' yes ']'
- + get_size
- ++ df -B M --output=avail /media/MyLiveUSB.15620
- ++ sed 1d
- ++ cut -d M -f1
- + SIZE1=13808
- ++ du -B M /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
- ++ cut -d M -f1
- + SIZE2=1242
- + SIZE2=1252
- + '[' 1252 -gt 13808 ']'
- + copy_iso_files
- + mkdir /media/MyLiveUSB.15620/KDE.3.temp
- + '[' 0 '!=' 0 ']'
- + mkdir -p /tmp/KDE.
- + mount /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso /tmp/KDE.
- mount: /tmp/KDE.: WARNING: device write-protected, mounted read-only.
- + cp -r /tmp/KDE./boot /tmp/KDE./EFI /tmp/KDE./isolinux /tmp/KDE./livecd.sqfs /media/MyLiveUSB.15620/KDE.3.temp
- + '[' 0 '!=' 0 ']'
- + '[' no '!=' yes ']'
- + stat /media/MyLiveUSB.15620/KDE.3.temp/EFI
- + '[' 0 = 0 ']'
- + mv /media/MyLiveUSB.15620/KDE.3.temp/EFI /media/MyLiveUSB.15620/EFI
- + mv /media/MyLiveUSB.15620/KDE.3.temp/isolinux /media/MyLiveUSB.15620/KDE.3
- + mv /media/MyLiveUSB.15620/KDE.3.temp/livecd.sqfs /media/MyLiveUSB.15620/KDE.3.sqfs
- + rm -rf /media/MyLiveUSB.15620/KDE.3.temp
- + prepare_for_install
- + efi_Part=
- ++ fdisk -l /dev/sdd -o Device,Type
- ++ grep EFI
- ++ tr -s ' '
- ++ cut -d ' ' -f1
- + efi_Part=
- ++ fdisk -l /dev/sdd -o Device,Type
- ++ grep BIOS
- ++ tr -s ' '
- ++ cut -d ' ' -f1
- + bios_grub=
- + '[' '' '!=' '' ']'
- + '[' no = no ']'
- + copy_grub2
- + echo ''
- + echo 'Copying Grub2 files from install to USB'
- + echo ''
- + mkdir -p /media/MyLiveUSB.15620/boot/grub2
- + cp -r /boot/grub2/custom.cfg /boot/grub2/fonts /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old /boot/grub2/grubenv /boot/grub2/grubenv.old /boot/grub2/i386-pc /boot/grub2/install.sh /boot/grub2/install.sh.old /boot/grub2/locale /boot/grub2/themes /boot/grub2/x86_64-efi /media/MyLiveUSB.15620/boot/grub2/
- + cp -r /boot/gfxmenu /media/MyLiveUSB.15620/boot/
- + rm -rf /media/MyLiveUSB.15620/boot/grub2/grub.cfg /media/MyLiveUSB.15620/boot/grub2/grub.cfg.old /media/MyLiveUSB.15620/boot/grub2/grubenv /media/MyLiveUSB.15620/boot/grub2/grubenv.old
- + rm -rf /media/MyLiveUSB.15620/boot/grub2/custom.cfg
- + rm -rf /media/MyLiveUSB.15620/boot/grub2/install.sh /media/MyLiveUSB.15620/boot/grub2/install.sh.old
- + '[' -f /media/MyLiveUSB.15620/boot/grub2/themes/pclinuxos/icons/pclinuxos.png ']'
- + cat
- + grub2_boot_options
- + STANDARD=
- + COPY2RAM=
- + PERSIST=
- + INSTALL=
- + DeBug=
- + osname=KDE.3
- + STANDARD='
- menuentry "KDE. Standard Boot" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + PERSIST='
- menuentry "KDE. with Persistence" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ changes_dev=UUID=ad5e1a19-45e6-4786-b120-01441110f9c7 acpi=on fstab=rw,noauto fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + SafeMode='
- menuentry "KDE. Video Safe Mode - Vesa" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ xdriver=vesa fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + COPY2RAM='
- menuentry "KDE. Copy to RAM" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ copy2ram acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + INSTALL='
- menuentry "KDE. Install" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent install
- initrd /KDE.3/initrd.gz
- }'
- + DeBug='
- menuentry "KDE. Debug On" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb debug
- initrd /KDE.3/initrd.gz
- }'
- ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --checklist --multiple '--title= MyLiveUSB v.2 ' '--text= <b>Select the <span color='\''blue'\''><b>EFI</b></span> Boot options you wish to Include</b> \n Please select the Boot Options which you wish to include from the list below
- ' --hide-column=2 --print-column=2 --separator= --height=420 --width=350 --column Select --column ' Option ' --column ' - Option Detail - ' TRUE '
- menuentry "KDE. Standard Boot" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }' 'Standard live boot option' FALSE '
- menuentry "KDE. with Persistence" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ changes_dev=UUID=ad5e1a19-45e6-4786-b120-01441110f9c7 acpi=on fstab=rw,noauto fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }' 'Boot with Persistence' FALSE '
- menuentry "KDE. Video Safe Mode - Vesa" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ xdriver=vesa fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }' 'Video Safe Mode - Vesa' FALSE '
- menuentry "KDE. Copy to RAM" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ copy2ram acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }' 'Copy To RAM' FALSE '
- menuentry "KDE. Install" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent install
- initrd /KDE.3/initrd.gz
- }' 'Install PCLOS' FALSE '
- menuentry "KDE. Debug On" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb debug
- initrd /KDE.3/initrd.gz
- }' 'Boot in debug Mode
- '
- + BOOT='
- menuentry "KDE. Standard Boot" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + for i in "$BOOT"
- + echo '
- menuentry "KDE. Standard Boot" --class pclinuxos {
- linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
- initrd /KDE.3/initrd.gz
- }'
- + do_installs
- + '[' no = yes ']'
- + '[' '' == 1 ']'
- + '[' no = no ']'
- + '[' gpt = gpt ']'
- + '[' '' '!=' '' ']'
- + '[' no = no ']'
- + '[' gpt = gpt ']'
- + '[' '' '!=' '' ']'
- + '[' no = no ']'
- + '[' '' = dos ']'
- + '[' no = no ']'
- + '[' '' = dos ']'
- + permissions
- + chmod -R 0777 /media/MyLiveUSB.15620
- + chmod -R 0777 /media/MyLiveUSB.15620/KDE.3 /media/MyLiveUSB.15620/KDE.3.sqfs
- + mkdir -p /media/MyLiveUSB.15620/lost+found
- + chmod 700 /media/MyLiveUSB.15620/lost+found
- + wait
- + umount /media/MyLiveUSB.23721
- umount: /media/MyLiveUSB.23721: not mounted.
- + umount
- umount: bad usage
- Try 'umount --help' for more information.
- + rm -rf /media/MyLiveUSB.15620/EFI
- + unmount_part
- + umount /dev/sdd3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement