SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
usbimg2disk.sh fails when trying to make the USB partition active with sfdisk. I think this is caused by the new default behavior of fdisk (DOS compatible mode=off, default display units=sectors)
I got it working again by replacing the sfdisk command with:
Code:
# Set the bootable flag for the first (and only...) partition:
lilo -A $USBDRV 1
I think it would also work to use fdisk commands 'c' and 'u' to switch back to the old behavior
Last edited by piratesmack; 11-17-2010 at 01:36 PM.
I tested last night... and had no issues or errors. The unmodified script works fine on my laptop with 32-bit Slackware-current (with all the latest updates applied).
I tested last night... and had no issues or errors. The unmodified script works fine on my laptop with 32-bit Slackware-current (with all the latest updates applied).
Eric
Hmm.
Did you use the '-f' switch so it recreates the partition table with the new fdisk?
Here's what happens when I run the script:
Code:
# sh usbimg2disk.sh -f -s /home/ftp/pub/Linux/Slackware/slackware-current -o /dev/sdc -l /tmp/usbimg2disk.txt
# We are going to format and use this device - '/dev/sdc':
#
# Disk /dev/sdc: 8127 MB, 8127512576 bytes
# 251 heads, 62 sectors/track, 1020 cylinders, total 15874048 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
# Disk identifier: 0xe38f2870
#
# Device Boot Start End Blocks Id System
# /dev/sdc1 * 62 15873239 7936589 b W95 FAT32
*** ***
*** If this is the wrong drive, then press CONTROL-C now! ***
*** ***
Or press ENTER to continue:
--- Formatting /dev/sdc and creating VFAT partition...
--- Last chance! Press CTRL-C to abort!
Or press ENTER to continue:
--- Available free space on the the USB drive is 7920508 KB
--- Required free space for installer: 33948 KB
--- Copying boot files to the USB drive...
--- Extracting Slackware initrd.img...
--- Modifying installer files...
--- Gzipping the initrd image again:
--- Copying Slackware package tree to the USB drive...
--- Cleaning up the staging area...
--- Making the USB drive '/dev/sdc' bootable...
*** usbimg2disk.sh FAILED at line 37 ***
--- Cleaning up the staging area...
rmdir: failed to remove `/mnt/img.XsYju5': No such file or directory
rmdir: failed to remove `/mnt/usb.sp14C7': No such file or directory
From the log file, here is sfdisk complaining about the partition table:
Code:
Disk /dev/sdc: 1020 cylinders, 251 heads, 62 sectors/track
Old situation:
Warning: The partition table looks like it was made
for C/H/S=*/14/2 (instead of 1020/251/62).
For this listing I'll assume that geometry.
Units = cylinders of 14336 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 73+ 566930- 566858- 7936000 b W95 FAT32
start: (c,h,s) expected (73,2,1) found (0,33,3)
end: (c,h,s) expected (1023,13,2) found (1020,13,2)
/dev/sdc2 0 - 0 0 0 Empty
/dev/sdc3 0 - 0 0 0 Empty
/dev/sdc4 0 - 0 0 0 Empty
New situation:
Warning: The partition table looks like it was made
for C/H/S=*/14/2 (instead of 1020/251/62).
For this listing I'll assume that geometry.
Units = cylinders of 14336 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 * 73+ 566930- 566858- 7936000 b W95 FAT32
start: (c,h,s) expected (73,2,1) found (0,33,3)
end: (c,h,s) expected (1023,13,2) found (1020,13,2)
/dev/sdc2 0 - 0 0 0 Empty
/dev/sdc3 0 - 0 0 0 Empty
/dev/sdc4 0 - 0 0 0 Empty
Warning: partition 1 does not end at a cylinder boundary
sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)
attached is the full log file
I'll try a fresh install if nobody can reproduce this issue I'm having.
Last edited by piratesmack; 11-18-2010 at 09:44 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.