Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.87 KB | None | 0 0
  1. + manual
  2. + '[' 0 '!=' 0 ']'
  3. + run_as_root
  4. +++ dirname ./myliveusb-yad
  5. ++ cd .
  6. ++ pwd
  7. + this_script_dir=/home/tex/Downloads
  8. ++ basename ./myliveusb-yad
  9. + this_script=myliveusb-yad
  10. + this_script_path_n_name=/home/tex/Downloads/myliveusb-yad
  11. ++ which kdesu
  12. + GUI_SU=/usr/bin/kdesu
  13. + '[' 0 '!=' 0 ']'
  14. + usb_install
  15. + set_variables
  16. + STANDARD=
  17. + COPY2RAM=
  18. + PERSIST=
  19. + INSTALL=
  20. + DeBug=
  21. + DEVICE=
  22. + DRIVES1=
  23. + DRIVES2=
  24. + Part_Num=
  25. + ISO_FILE=
  26. + JOB=
  27. + LABEL=LIVE_PCLinuxOS
  28. + ADD=
  29. + LIVE=
  30. + Mnt_Pnt=/media/MyLiveUSB.15620
  31. + NAME=
  32. + SIZE1=
  33. + SIZE2=
  34. + Target_Part=
  35. + Type=
  36. + isolin2=
  37. + isolin_full=
  38. + isolin_path=
  39. + mypid=3824
  40. + sqfs2=
  41. + sqfs_dir=
  42. + sqfs_full=
  43. + sqfs_name=
  44. + efi_Part=
  45. + efi_Mnt=/media/MyLiveUSB.23721
  46. + get_device
  47. + 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=
  48. <b>Deciding on the Install Device</b>
  49.  
  50.  
  51. Please ensure that the device you intend to use
  52.  
  53. is <span color='\''red'\''><b>NOT</b></span> plugged in, else
  54.  
  55. withdraw it now and wait a few seconds before selecting <span color='\''blue'\''><b>Yes</b></span> below.
  56.  
  57. You must ensure you do not plug in or withdraw any device other than the
  58.  
  59. one intended for the OS, while this application is running.
  60.  
  61. Are you ready to proceed with the LiveUSB install?
  62.  
  63. Selecting <span color='\''red'\''><b>No</b></span> will exit the application.
  64. ' 0
  65. + '[' 0 '!=' 0 ']'
  66. ++ lsblk -n -o TYPE,NAME
  67. ++ grep disk
  68. ++ tr -s ' '
  69. ++ cut -d ' ' -f2
  70. ++ sed 's|sd|/dev/sd|g'
  71. + DRIVES1='/dev/sda
  72. /dev/sdb
  73. /dev/sdc
  74. nvme0n1'
  75. + 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=
  76. <b> Plug in your USB flash stick now </b>
  77.  
  78. Please insert it now and select the appropriate button below.' 0
  79. + '[' 0 '!=' 0 ']'
  80. + echo
  81. + sleep 10
  82. + yad --center --window-icon=/usr/share/icons/myliveusb.png --progress --pulsate '--title= MyLiveUSB v.2 ' '--text=
  83. <b>DEVICE DETECTION</b>
  84.  
  85. Your Inserted device is being detected
  86.  
  87. This will take just a few moments.
  88.  
  89. Do <span color='\''red'\''><b>NOT</b></span> attempt to view its contents while running this application.
  90.  
  91. ' --auto-close --auto-kill
  92. ++ lsblk -n -o TYPE,NAME
  93. ++ grep disk
  94. ++ tr -s ' '
  95. ++ cut -d ' ' -f2
  96. ++ sed 's|sd|/dev/sd|g'
  97. + DRIVES2='/dev/sda
  98. /dev/sdb
  99. /dev/sdc
  100. /dev/sdd
  101. nvme0n1'
  102. ++ echo /dev/sda /dev/sdb /dev/sdc /dev/sdd nvme0n1
  103. + for file in $(echo $DRIVES2)
  104. ++ grep -v /dev/sda
  105. ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
  106. ++ head -1
  107. + tmpstr=
  108. + '[' '' '!=' '' ']'
  109. + for file in $(echo $DRIVES2)
  110. ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
  111. ++ grep -v /dev/sdb
  112. ++ head -1
  113. + tmpstr=
  114. + '[' '' '!=' '' ']'
  115. + for file in $(echo $DRIVES2)
  116. ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
  117. ++ grep -v /dev/sdc
  118. ++ head -1
  119. + tmpstr=
  120. + '[' '' '!=' '' ']'
  121. + for file in $(echo $DRIVES2)
  122. ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
  123. ++ grep -v /dev/sdd
  124. ++ head -1
  125. + tmpstr='/dev/sda /dev/sdb /dev/sdc nvme0n1'
  126. + '[' '/dev/sda /dev/sdb /dev/sdc nvme0n1' '!=' '' ']'
  127. + DEVICE='/dev/sdd '
  128. + for file in $(echo $DRIVES2)
  129. ++ echo /dev/sda /dev/sdb /dev/sdc nvme0n1
  130. ++ grep -v nvme0n1
  131. ++ head -1
  132. + tmpstr=
  133. + '[' '' '!=' '' ']'
  134. + '[' '/dev/sdd ' == '' ']'
  135. + '[' '' = '' ']'
  136. ++ lsblk -l -o FSTYPE,NAME,SIZE,LABEL /dev/sdd
  137. ++ grep sd
  138. ++ grep ext
  139. ++ tr -s ' '
  140. ++ cut -d ' ' -f2,3,4
  141. ++ tr -t ' ' '\n'
  142. ++ sed 's|sd|/dev/sd|g'
  143. ++ 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 '
  144. + Target_Part='/dev/sdd3|14.6G||'
  145. + '[' 0 = 1 ']'
  146. + '[' '/dev/sdd3|14.6G||' = '' ']'
  147. ++ echo '/dev/sdd3|14.6G||'
  148. ++ cut -d '|' -f1
  149. + Target_Part=/dev/sdd3
  150. + echo /dev/sdd3
  151. /dev/sdd3
  152. + umount /dev/sdd3
  153. umount: /dev/sdd3: not mounted.
  154. ++ echo /dev/sdd3
  155. ++ cut -c9-10
  156. + Part_Num=3
  157. + get_device_type
  158. + DOS=
  159. + GPT=
  160. ++ fdisk -l /dev/sdd
  161. ++ grep dos
  162. ++ sed 's| ||g'
  163. ++ cut -d : -f2
  164. + DOS=
  165. ++ fdisk -l /dev/sdd
  166. ++ grep gpt
  167. ++ sed 's| ||g'
  168. ++ cut -d : -f2
  169. + GPT=gpt
  170. + create_mounts
  171. + mkdir /media/MyLiveUSB.23721
  172. + mkdir /media/MyLiveUSB.15620
  173. + write_label
  174. ++ e2label /dev/sdd3
  175. + LABEL_Exist=
  176. + '[' 0 '!=' 0 ']'
  177. + get_uuid
  178. ++ lsblk -l -n -o UUID /dev/sdd3
  179. + PART_UUID=ad5e1a19-45e6-4786-b120-01441110f9c7
  180. + '[' ad5e1a19-45e6-4786-b120-01441110f9c7 == '' ']'
  181. + get_job_yad
  182. ++ 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
  183. ' --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.
  184. This option deletes all existing files on the selected partition.' TRUE 2 '
  185. Add a second or subsequent OS to an USB stick partition
  186. ' FALSE 3 '
  187. Exit this utility
  188. '
  189. + JOB='1|'
  190. ++ echo '1|'
  191. ++ cut -d '|' -f1
  192. + JOB=1
  193. + '[' 1 == 1 ']'
  194. + ADD=no
  195. ++ 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
  196. ' --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.
  197. ' FALSE 2 'Use the files from a Live Media or an extracted ISO on HDD as the source.
  198. ' FALSE 3 'Exit this utility.
  199. '
  200. + JOB='1|'
  201. ++ echo '1|'
  202. ++ cut -d '|' -f1
  203. + JOB=1
  204. + '[' 1 == 1 ']'
  205. + LIVE=no
  206. + mount_part
  207. + mount /dev/sdd3 /media/MyLiveUSB.15620
  208. + '[' 0 '!=' 0 ']'
  209. + get_name
  210. + [[ ! '' =~ [a-zA-Z0-9] ]]
  211. ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --list --height=420 --width=460 '--title= MyLiveUSB v.2' '--text=
  212. <b>Select the OS NAME</b>
  213. Please ensure you do not select a
  214. name already in use on the device.
  215. Highlight a name and select <span color='\''blue'\''><b>OK</b></span> to accept it.' --editable --column ' - Suggested Names -
  216. Click an entry a second time to edit it.
  217. Press Enter to apply your edit.
  218. The name must contain one letter or number.' Mate. KDE. LXDE. Xfce. 'Click Twice to Edit'
  219. + NAME='KDE.|'
  220. ++ echo 'KDE.|'
  221. ++ tr ' ' _
  222. ++ cut -d '|' -f1
  223. + NAME=KDE.
  224. + '[' 0 '!=' 0 ']'
  225. + '[' KDE. = '' ']'
  226. + '[' no = yes ']'
  227. + [[ ! KDE. =~ [a-zA-Z0-9] ]]
  228. + '[' no '!=' yes ']'
  229. + get_iso
  230. + 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 '
  231. + ISO_FILE=
  232. + extension=
  233. + '[' '' '!=' iso ']'
  234. ++ yad --center --window-icon=/usr/share/icons/myliveusb.png --file-selection --button=Select:0 --button=QuitApplication:2 --file-filter '*.iso' --title ' MyLiveUSB v.2 '
  235. Error creating proxy: The connection is closed (g-io-error-quark, 18)
  236. Error creating proxy: The connection is closed (g-io-error-quark, 18)
  237. Error creating proxy: The connection is closed (g-io-error-quark, 18)
  238. Error creating proxy: The connection is closed (g-io-error-quark, 18)
  239. + ISO_FILE=/mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
  240. + '[' 0 = 2 ']'
  241. + echo /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
  242. /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
  243. ++ echo iso
  244. + extension=iso
  245. + echo 'Extension is iso'
  246. Extension is iso
  247. + '[' iso '!=' iso ']'
  248. + echo
  249. + sleep 3
  250. + yad --center --window-icon=/usr/share/icons/myliveusb.png --progress --pulsate '--title= MyLiveUSB v.2 ' '--text=
  251. <b>Creating the Operating System on the Device</b>
  252.  
  253.  
  254. This is a visual indication that the script is working. It continues in the background during operation.
  255.  
  256. Some operations such as wiping and copying files to the partition may take a <i><b>very</b></i> long time.
  257.  
  258. The speed of completion depends on the size of the OS to be installed and also on the speed of the device in use.
  259.  
  260. Good Luck!
  261.  
  262. ' --auto-close --auto-kill
  263. + '[' no = yes ']'
  264. + '[' no '!=' yes ']'
  265. + wipe_part
  266. + rm -rf /media/MyLiveUSB.15620/lost+found
  267. ++ fdisk -l /dev/sdd -o Device,Type
  268. ++ grep EFI
  269. ++ tr -s ' '
  270. ++ cut -d ' ' -f1
  271. + efi_wipe=
  272. + '[' '' '!=' '' ']'
  273. + '[' no '!=' yes ']'
  274. + get_size
  275. ++ df -B M --output=avail /media/MyLiveUSB.15620
  276. ++ sed 1d
  277. ++ cut -d M -f1
  278. + SIZE1=13808
  279. ++ du -B M /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso
  280. ++ cut -d M -f1
  281. + SIZE2=1242
  282. + SIZE2=1252
  283. + '[' 1252 -gt 13808 ']'
  284. + copy_iso_files
  285. + mkdir /media/MyLiveUSB.15620/KDE.3.temp
  286. + '[' 0 '!=' 0 ']'
  287. + mkdir -p /tmp/KDE.
  288. + mount /mnt/kde/home/guest/pclinuxos64-kde5-darkstar-2019.10.iso /tmp/KDE.
  289. mount: /tmp/KDE.: WARNING: device write-protected, mounted read-only.
  290. + cp -r /tmp/KDE./boot /tmp/KDE./EFI /tmp/KDE./isolinux /tmp/KDE./livecd.sqfs /media/MyLiveUSB.15620/KDE.3.temp
  291. + '[' 0 '!=' 0 ']'
  292. + '[' no '!=' yes ']'
  293. + stat /media/MyLiveUSB.15620/KDE.3.temp/EFI
  294. + '[' 0 = 0 ']'
  295. + mv /media/MyLiveUSB.15620/KDE.3.temp/EFI /media/MyLiveUSB.15620/EFI
  296. + mv /media/MyLiveUSB.15620/KDE.3.temp/isolinux /media/MyLiveUSB.15620/KDE.3
  297. + mv /media/MyLiveUSB.15620/KDE.3.temp/livecd.sqfs /media/MyLiveUSB.15620/KDE.3.sqfs
  298. + rm -rf /media/MyLiveUSB.15620/KDE.3.temp
  299. + prepare_for_install
  300. + efi_Part=
  301. ++ fdisk -l /dev/sdd -o Device,Type
  302. ++ grep EFI
  303. ++ tr -s ' '
  304. ++ cut -d ' ' -f1
  305. + efi_Part=
  306. ++ fdisk -l /dev/sdd -o Device,Type
  307. ++ grep BIOS
  308. ++ tr -s ' '
  309. ++ cut -d ' ' -f1
  310. + bios_grub=
  311. + '[' '' '!=' '' ']'
  312. + '[' no = no ']'
  313. + copy_grub2
  314. + echo ''
  315. + echo 'Copying Grub2 files from install to USB'
  316. + echo ''
  317. + mkdir -p /media/MyLiveUSB.15620/boot/grub2
  318. + 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/
  319. + cp -r /boot/gfxmenu /media/MyLiveUSB.15620/boot/
  320. + 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
  321. + rm -rf /media/MyLiveUSB.15620/boot/grub2/custom.cfg
  322. + rm -rf /media/MyLiveUSB.15620/boot/grub2/install.sh /media/MyLiveUSB.15620/boot/grub2/install.sh.old
  323. + '[' -f /media/MyLiveUSB.15620/boot/grub2/themes/pclinuxos/icons/pclinuxos.png ']'
  324. + cat
  325. + grub2_boot_options
  326. + STANDARD=
  327. + COPY2RAM=
  328. + PERSIST=
  329. + INSTALL=
  330. + DeBug=
  331. + osname=KDE.3
  332. + STANDARD='
  333. menuentry "KDE. Standard Boot" --class pclinuxos {
  334. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
  335. initrd /KDE.3/initrd.gz
  336. }'
  337. + PERSIST='
  338. menuentry "KDE. with Persistence" --class pclinuxos {
  339. 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
  340. initrd /KDE.3/initrd.gz
  341. }'
  342. + SafeMode='
  343. menuentry "KDE. Video Safe Mode - Vesa" --class pclinuxos {
  344. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ xdriver=vesa fromusb quiet splash=silent
  345. initrd /KDE.3/initrd.gz
  346. }'
  347. + COPY2RAM='
  348. menuentry "KDE. Copy to RAM" --class pclinuxos {
  349. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ copy2ram acpi=on fromusb quiet splash=silent
  350. initrd /KDE.3/initrd.gz
  351. }'
  352. + INSTALL='
  353. menuentry "KDE. Install" --class pclinuxos {
  354. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent install
  355. initrd /KDE.3/initrd.gz
  356. }'
  357. + DeBug='
  358. menuentry "KDE. Debug On" --class pclinuxos {
  359. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb debug
  360. initrd /KDE.3/initrd.gz
  361. }'
  362. ++ 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
  363. ' --hide-column=2 --print-column=2 --separator= --height=420 --width=350 --column Select --column ' Option ' --column ' - Option Detail - ' TRUE '
  364. menuentry "KDE. Standard Boot" --class pclinuxos {
  365. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
  366. initrd /KDE.3/initrd.gz
  367. }' 'Standard live boot option' FALSE '
  368. menuentry "KDE. with Persistence" --class pclinuxos {
  369. 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
  370. initrd /KDE.3/initrd.gz
  371. }' 'Boot with Persistence' FALSE '
  372. menuentry "KDE. Video Safe Mode - Vesa" --class pclinuxos {
  373. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ xdriver=vesa fromusb quiet splash=silent
  374. initrd /KDE.3/initrd.gz
  375. }' 'Video Safe Mode - Vesa' FALSE '
  376. menuentry "KDE. Copy to RAM" --class pclinuxos {
  377. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ copy2ram acpi=on fromusb quiet splash=silent
  378. initrd /KDE.3/initrd.gz
  379. }' 'Copy To RAM' FALSE '
  380. menuentry "KDE. Install" --class pclinuxos {
  381. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent install
  382. initrd /KDE.3/initrd.gz
  383. }' 'Install PCLOS' FALSE '
  384. menuentry "KDE. Debug On" --class pclinuxos {
  385. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb debug
  386. initrd /KDE.3/initrd.gz
  387. }' 'Boot in debug Mode
  388. '
  389. + BOOT='
  390. menuentry "KDE. Standard Boot" --class pclinuxos {
  391. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
  392. initrd /KDE.3/initrd.gz
  393. }'
  394. + for i in "$BOOT"
  395. + echo '
  396. menuentry "KDE. Standard Boot" --class pclinuxos {
  397. linux /KDE.3/vmlinuz livecd=/KDE.3 root=/ acpi=on fromusb quiet splash=silent
  398. initrd /KDE.3/initrd.gz
  399. }'
  400. + do_installs
  401. + '[' no = yes ']'
  402. + '[' '' == 1 ']'
  403. + '[' no = no ']'
  404. + '[' gpt = gpt ']'
  405. + '[' '' '!=' '' ']'
  406. + '[' no = no ']'
  407. + '[' gpt = gpt ']'
  408. + '[' '' '!=' '' ']'
  409. + '[' no = no ']'
  410. + '[' '' = dos ']'
  411. + '[' no = no ']'
  412. + '[' '' = dos ']'
  413. + permissions
  414. + chmod -R 0777 /media/MyLiveUSB.15620
  415. + chmod -R 0777 /media/MyLiveUSB.15620/KDE.3 /media/MyLiveUSB.15620/KDE.3.sqfs
  416. + mkdir -p /media/MyLiveUSB.15620/lost+found
  417. + chmod 700 /media/MyLiveUSB.15620/lost+found
  418. + wait
  419. + umount /media/MyLiveUSB.23721
  420. umount: /media/MyLiveUSB.23721: not mounted.
  421. + umount
  422. umount: bad usage
  423. Try 'umount --help' for more information.
  424. + rm -rf /media/MyLiveUSB.15620/EFI
  425. + unmount_part
  426. + umount /dev/sdd3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement