LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-17-2010, 09:48 AM   #1
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
usbimg2disk.sh fails in current


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.
 
Old 11-17-2010, 12:34 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Very well-debugged.
I think your "lilo -A $USBDRV 1" is the best option. I'll test later tonight.

Eric
 
1 members found this post helpful.
Old 11-18-2010, 07:57 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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
 
Old 11-18-2010, 09:22 AM   #4
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Original Poster
Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by Alien Bob View Post
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.
Attached Files
File Type: txt usbimg2disk.txt (2.7 KB, 35 views)

Last edited by piratesmack; 11-18-2010 at 09:44 AM.
 
Old 11-25-2010, 03:48 PM   #5
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Original Poster
Rep: Reputation: 142Reputation: 142
Question

OK I tried a fresh install of the latest 32-Bit Current, and I'm still seeing the same issue.

Am I really the only one?
 
Old 11-25-2010, 07:04 PM   #6
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
I got the exact same error on a slackware64-current multilib install.

Quote:
Originally Posted by piratesmack View Post
OK I tried a fresh install of the latest 32-Bit Current, and I'm still seeing the same issue.

Am I really the only one?
 
1 members found this post helpful.
Old 11-26-2010, 02:27 PM   #7
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Original Poster
Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by escaflown View Post
I got the exact same error on a slackware64-current multilib install.
Thanks.

Glad I'm not the only one.
 
  


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] USB bootstick, usbimg2disk.sh and OEM recovery partition catkin Slackware 15 07-01-2010 02:54 AM
inkscape fails on current... imitis Slackware 6 04-07-2010 10:08 AM
[SOLVED] Build fails in current: gtkimageview-1.6.4 damgar Slackware 2 02-14-2010 10:18 AM
usbimg2disk.sh fails on dependencies check zavko Slackware 1 02-11-2010 10:11 AM
[SOLVED] Firefox fails to compile on -current Daedra Slackware 7 01-16-2010 09:08 PM

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

All times are GMT -5. The time now is 06:23 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