LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-10-2021, 10:23 PM   #1
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 229

Rep: Reputation: 45
usbimg2disk.sh FAILED at line 464


Pre-fdisked the usb stick (as seen below) .

/sbin/mkdosfs -F32 -n SWCURENT /dev/sdh1

Then ...

Code:
# ~/bin/usbimg2disk.sh -l ~/usbimg2disk-slackwarecurrent-usb-20211106.log \
-i /home/ftp/pub/Linux/Slackware/slackware-current/\
usb-and-pxe-installers/usbboot.img \
-s /home/ftp/pub/Linux/Slackware/slackware-current -o /dev/sdh                         

# We are going to use this device - '/dev/sdh':
# Vendor : General 
# Model  : UDisk           
# Size   : 15400 MB
# 
# FDISK OUTPUT:
# Disk /dev/sdh: 15 GiB, 16148070400 bytes, 31539200 sectors
# Units: sectors of 1 * 512 = 512 bytes
# Sector size (logical/physical): 512 bytes / 512 bytes
# I/O size (minimum/optimal): 512 bytes / 512 bytes
# Disklabel type: gpt
# Disk identifier: 3585108A-4F3D-40DE-BA0F-2557B5BFEB1F
# 
# Device       Start      End  Sectors Size Type
# /dev/sdh1  2099200 31539166 29439967  14G Microsoft basic data
# /dev/sdh2     2048  2099199  2097152   1G EFI System
# 
# Partition table entries are not in disk order.

***                                                       ***
*** If this is the wrong drive, then press CONTROL-C now! ***
***                                                       ***
Or press ENTER to continue: 
--- Using current FAT partition label 'SWCURENT'
--- Available free space on the the USB drive is 14617728 KB
--- Required free space for installer: 88448 KB
--- Your USB drive contains directories 'syslinux' and/or 'slackware-current'
--- These will be overwritten.  Press CTRL-C to abort now!
Or press ENTER to continue: 
--- Copying boot files to the USB drive...
--- Extracting Slackware initrd.img...
*** /root/bin/usbimg2disk.sh FAILED at line 464 ***
--- Cleaning up the staging area...
The offending line in the script from the 'at line' above ...

Code:
# Copy boot image files to the USB disk in its own subdirectory '/syslinux':
echo "--- Copying boot files to the USB drive..."
mkdir -p $MNTDIR2/syslinux
cp -R $MNTDIR1/* $MNTDIR2/syslinux/
rm -f $MNTDIR2/syslinux/ldlinux.sys

# If we are creating a full Slackware installer, there is a lot more to do:
if [ "$FULLINSTALLER" = "yes" ]; then
  # Extract the Slackware initrd for modifications we have to do:
  echo "--- Extracting Slackware initrd.img..."
  ( cd ${MNTDIR3}/
    gunzip -cd ${MNTDIR2}/syslinux/initrd.img | cpio -i -d -H newc --no-absolute-filenames
  ) 2>>$LOGFILE
[^^^ line 464 of 502 (92%), character 15396 of 16901 (91%) ^^^ ]

  # Modify installer files so that installing from USB stick will be easier:
  echo "--- Modifying installer files..."
  ( cd ${MNTDIR3}/
    # Try to automatically mount the installer partition:
    mkdir usbinstall
    echo "mount -t vfat -o ro,shortname=mixed \$(/sbin/blkid -t LABEL=$FATLABEL | cut -f1 -d:) /usbinstall 1>/dev/null 2>&1" >> etc$
    # Adapt the dialogs so that pressing [OK] will be all there is to it:
    sed -i -e 's# --menu# --default-item 6 --menu#' usr/lib/setup/SeTmedia
    sed -i -e "s# 2> \$TMP/sourcedir# /usbinstall/$(basename $REPOSROOT)/$PKGDIR 2> \$TMP/sourcedir#" usr/lib/setup/INSdir
    FIXF=$(find usr/lib/setup -name SeTp*media)
    sed -i -e 's# --menu# --default-item 3 --menu#' $FIXF
  ) 2>>$LOGFILE
Contents of Log file seems to hit the nail on the head , Now just need to see why ...

Code:
# cat ~/usbimg2disk-slackwarecurrent-usb-20211106.log

gzip: /mnt/usb.R6lb7c/syslinux/initrd.img: not in gzip format
cpio: premature end of file

Last edited by babydr; 11-10-2021 at 10:34 PM. Reason: Missing info ...
 
Old 11-10-2021, 11:28 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,511

Rep: Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474Reputation: 8474
Quote:
Originally Posted by babydr View Post
Contents of Log file seems to hit the nail on the head , Now just need to see why ...
I believe it's because you're using a very old (Slackware 14.0 era) usbimg2disk.sh with -current. Try the one that's included with -current instead.
 
2 members found this post helpful.
Old 11-11-2021, 05:07 PM   #3
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 229

Original Poster
Rep: Reputation: 45
Hmm , Maybe this is why ...

Code:
# locate usbimg2disk.sh | xargs ls -alrt
-rw-r--r-- 1 root root 16894 Sep  3  2012 /home/ftp/pub/Linux/Slackware/slackware-current/source/installer/usbimg2disk.sh
-rw-r--r-- 1 root root 16194 Mar 19  2021 /home/ftp/pub/Linux/Slackware/slackware-current/usb-and-pxe-installers/usbimg2disk.sh
-rwxr-xr-x 1 root root 16901 Nov 10 16:18 /root/bin/usbimg2disk.sh
Tho , The one I downloaded from Eric's archive the one I used is newer then ...

Code:
--- /home/ftp/pub/Linux/Slackware/slackware-current/usb-and-pxe-installers/usbimg2disk.sh 2021-03-19 10:02:39.066023243 -0800
+++ /root/bin/usbimg2disk.sh    2021-11-10 16:18:48.110508327 -0900
@@ -1,7 +1,7 @@
 #!/bin/bash
-# $Id: usbimg2disk.sh,v 1.23 2012/09/03 20:52:31 eha Exp eha $
+# $Id: usbimg2disk.sh,v 1.24 2014/06/08 14:34:46 eha Exp eha $
Now I am confused .
 
Old 11-18-2021, 08:55 PM   #4
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 229

Original Poster
Rep: Reputation: 45
@volkerdi , Your suggestion worked when using the unchanged version But modified usb-and-pxe-installers/usbimg2disk.sh shell script .

I've one Very good request of un-versioned & modified scripts that are included in the distribution ,

Please either Remove them or Version them

I Thank You for the recommendation which worked flawlessly .

Twyl , JimL
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] usbimg2disk.sh FAILED at line 483 stormtracknole Slackware 16 03-16-2015 01:14 PM
usbimg2disk.sh fails on dependencies check zavko Slackware 1 02-11-2010 10:11 AM
High Point Rocket Raid 464 driver won't compile dreadknott Linux - Hardware 0 10-23-2006 08:12 AM
DIV3 464:352 -> RAW 320:240 with mencoder Vinter Linux - Software 0 07-31-2005 09:12 AM
Error during Install "Kernel BUG at usb-ohci.h:464" mike3411 Linux - General 0 02-15-2005 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration