usb_inst.sh creates partition with TypeId=0x83 [solved]

Post there if you have problem when downloading the iso, or burning it.
txusff
Posts: 17
Joined: 16 Sep 2012, 07:38

usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby txusff » 16 Sep 2012, 07:46

My UsbStick SYSRESC 2.8.0 work and boot ok, but my MacbookAir MAC OS X can't read it.

usb_inst.sh creates the partition in the usbstick with partition type id=0x83 linux, but after is formated with mkfs.vfat, shoud be 0x0B or 0x0C.
Test with fdisk -l to view this.

The Line number 263 of usb_inst.sh script should be:

Code: Select all

 cmd="${PROG_PARTED} -s ${devname} mkpart primary fat32 0 100%"

With the parameter fstype=fat32 creates one primary partition with typeId 0x0C (FAT32)
Last edited by txusff on 21 Oct 2012, 14:24, edited 1 time in total.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: [BUG] usb_inst.sh creates partition with TypeId=0x83

Postby admin » 12 Oct 2012, 17:17

Thanks the fix will be in the next version

khayyam
Posts: 2
Joined: 13 Jun 2012, 18:01

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby khayyam » 21 Oct 2012, 16:23

txusff, admin ...

I suspect this change caused this bug in the current 3.0.1 beta.

Code: Select all

--> /var/tmp/usb_inst.tmp/parted -s /dev/sdb mkpart fat32 primary 0 100%
Error: Expecting a partition type.


Besdies the command syntax being incorrect in the above, which should read 'mkpart PART-TYPE [FS-TYPE] START END', there seems be an issue with the statically linked parted and fat32.

Code: Select all

# ./parted -s /dev/sdc mkpart primary fat32 0 100%
Error: Unknown file system type "fat32".


Not sure exactly what the issue is but I thought it worth mentioning.

best ... khay

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby admin » 21 Oct 2012, 20:33

Thanks for the bug report. This should be fixed in the following version:
systemrescuecd-x86-3.1.0-beta002

tallbiker66
Posts: 2
Joined: 29 Oct 2012, 18:13

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby tallbiker66 » 29 Oct 2012, 18:14

Nope. I've been using beta 0004 and the parted binary that ships with it doesn't support fat32.

zwettemaan
Posts: 1
Joined: 03 Nov 2012, 22:25

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby zwettemaan » 03 Nov 2012, 22:31

Had the same issue - the parted that's embedded on the iso does not seem to know FAT32. However, the parted on my Ubuntu Linux 12.04LTS does, so I tweaked the install script.

Assuming you've got the ISO mounted on /tmp/cdrom, here's what I did:

cd /tmp/cdrom
cp usb_inst.sh /tmp

Then I modified /tmp/usb_inst.sh:

Add a line near the top:

...
cd /tmp/cdrom #<<< ADDED THIS ON LINE 8. MIGHT NOT NEED IT BUT BETTER SAFE
logfile="/var/tmp/usb_inst.log"
...

Modify a line inside:

....
# programs directly used by this script
PROG_PARTED="/sbin/parted" #<<< Was "${TMPDIR}/parted". Replace it with my own
PROG_INSTMBR="${TMPDIR}/install-mbr"
....

Save, then execute from /tmp:

cd /tmp
sudo bash ./usb_inst.sh

That did the trick for me!

HTH.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby admin » 05 Nov 2012, 20:14

Thanks this has been fixed in SystemRescueCd-3.1.1-beta002

cschanzle
Posts: 11
Joined: 28 Sep 2009, 21:34

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby cschanzle » 05 Nov 2012, 21:56

This is NOT fixed in 3.1.

My workaround steps to replace broken parted:
[burn & boot CD]
cd /dev/shm/
cp -vpr /livemnt/boot/. . # takes a few mins
\cp -p /usr/sbin/parted usb_inst/
./usb_inst.sh

Also, the installer log shows a grub error - not sure if it's significant:
...
Files have been successfully copied to /dev/sdb1
sed: can't read /mnt/usbstick/boot/grub/grub.cfg: No such file or directory
syslinux has successfully prepared /dev/sdb1

Note the USB stick did boot.

It'd be nice if the ISO could just be dumped to usb and boot. A hybrid boot, like recent Fedora iso's.

tallbiker66
Posts: 2
Joined: 29 Oct 2012, 18:13

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby tallbiker66 » 06 Nov 2012, 17:04

I agree it hasn't been fixed with the final release of the 3.1 image, which is rather disappointing. The workaround is to loopback mount the iso image somewhere. Copy the content of the mountpoint to the /tmp/cdrom directory and use the parted binary that ships with your favorite distro.

openfred
Posts: 1
Joined: 29 Nov 2012, 09:41

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby openfred » 29 Nov 2012, 09:51

Documentation is wrong
http://www.sysresccd.org/Sysresccd-manu ... _USB-stick

mkdir -p /tmp/cdrom
mount -o loop,exec /path/to/systemrescuecd-x86-x.y.z.iso /tmp/cdrom


should be

mkdir -p /mnt/usbstick
mount -o loop,exec /path/to/systemrescuecd-x86-x.y.z.iso /mnt/usbstick


It is said in the documentation
"We will use /tmp/cdrom in this example but you can use any directory such as /mnt/cdrom"

But it is hardcoded /mnt/usbstick in the script !

Successfully tested on version 2.8.1

Fred

txusff
Posts: 17
Joined: 16 Sep 2012, 07:38

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby txusff » 02 Dec 2012, 14:57

deleted
Last edited by txusff on 18 Dec 2012, 17:58, edited 2 times in total.

txusff
Posts: 17
Joined: 16 Sep 2012, 07:38

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby txusff » 17 Dec 2012, 16:53

Oppppps:

parted executed from sysresccd 3.0.0 /usr/sbin/parted Known filesystems

Code: Select all

# parted -v
parted (GNU parted) 3.1
....

# parted /dev/sda help mkpart
  mkpart PART-TYPE [FS-TYPE] START END     make a partition

   PART-TYPE is one of: primary, logical, extended
        FS-TYPE is one of: nilfs2, ext4, ext3, ext2, fat32, fat16, hfsx, hfs+, hfs, jfs, swsusp, linux-swap(v1), linux-swap(v0),
        ntfs, reiserfs, hp-ufs, sun-ufs, xfs, apfs2, apfs1, asfs, amufs5, amufs4, amufs3, amufs2, amufs1, amufs0, amufs, affs7,
        affs6, affs5, affs4, affs3, affs2, affs1, affs0, linux-swap, linux-swap(new), linux-swap(old)
        START and END are disk locations, such as 4GB or 10%.  Negative values count from the end of the disk.  For example, -1s
        specifies exactly the last sector.
       
        'mkpart' makes a partition without creating a new file system on the partition.  FS-TYPE may be specified to set an
        appropriate partition ID.


parted executed from Linux Mint 14 Known filesystems

Code: Select all

# parted -v
parted (GNU parted) 2.3

# parted /dev/sdb help mkpart
  mkpart PART-TYPE [FS-TYPE] START END     make a partition

   PART-TYPE is one of: primary, logical, extended
        FS-TYPE is one of: zfs, btrfs, ext4, ext3, ext2, fat32, fat16, hfsx,
        hfs+, hfs, jfs, swsusp, linux-swap(v1), linux-swap(v0), ntfs, reiserfs,
        freebsd-ufs, hp-ufs, sun-ufs, xfs, apfs2, apfs1, asfs, amufs5, amufs4,
        amufs3, amufs2, amufs1, amufs0, amufs, affs7, affs6, affs5, affs4,
        affs3, affs2, affs1, affs0, linux-swap, linux-swap(new),
        linux-swap(old)
        START and END are disk locations, such as 4GB or 10%.  Negative values
        count from the end of the disk.  For example, -1s specifies exactly the
        last sector.
       
        'mkpart' makes a partition without creating a new file system on the
        partition.  FS-TYPE may be specified to set an appropriate partition
        ID.


parted executed from sysresccd 3.0.0 /livemnt/boot/usb_inst/ filesystems types is empty
This parted (./usb_inst/parted) whith "fat32" parameter like FS-TYPE fails.
(something like this: ./parted mkpart /dev/sdb primary fat32 0 100%) = error fs-type unknown

Code: Select all

# parted -v
GNU Parted 2.2
...

# parted /dev/sdb help mkpart
  mkpart PART-TYPE [FS-TYPE] START END     make a partition

   PART-TYPE is one of: primary, logical, extended
        FS-TYPE is one of:
        START and END are disk locations, such as 4GB or 10%.  Negative values
        count from the end of the disk.  For example, -1s specifies exactly the
        last sector.
       
        'mkpart' makes a partition without creating a new file system on the
        partition.  FS-TYPE may be specified to set an appropriate partition
        ID.

rpodgorny
Posts: 1
Joined: 21 Dec 2012, 13:43

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby rpodgorny » 21 Dec 2012, 13:46

still not fixed! come on, this is a one-liner! :-(

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby admin » 21 Dec 2012, 18:49

You complain about sysresccd 3.0.0, so please use the latest version where the script has been fixed.
The "fat32" argument has been removed from the script which uses the static binaries.

txusff
Posts: 17
Joined: 16 Sep 2012, 07:38

Re: usb_inst.sh creates partition with TypeId=0x83 [solved]

Postby txusff » 21 Dec 2012, 21:42

admin wrote:The "fat32" argument has been removed from the script which uses the static binaries.
Yes, and so usb_inst.sh creates a partition with Type_ID 0x83

The dirty way to change the partition type when you use the static binary, usb_inst.sh :

Code: Select all

cmd="${PROG_PARTED} -s ${devname} mkpart primary 0 100%"
echo "--> ${cmd}"
if ! ${cmd} 2>/dev/null
then
die "${cmd} --> failed"
fi
and after add:

Code: Select all

echo -ne "\x0c" > ${TMPDIR}/c.bin
dd if=${TMPDIR}/c.bin of=${devname} bs=1 count=1 seek=450
rm ${TMPDIR}/c.bin


Return to “Downloading and burning”

Who is online

Users browsing this forum: No registered users and 1 guest