USB Live

SanDisk Cruzer : 4023MB

disk=/dev/sdc
part=${disk}1

# sudo parted $disk -s mklabel msdos  unit cyl  print  mkpart primary fat16 1 100%  toggle 1 boot unit b print 

sudo parted $disk -s mklabel msdos  unit cyl  print  mkpart primary fat16 1 255  toggle 1 boot unit b print 

LANG=C sudo parted $DISK -s unit b print unit cyl print unit s print
#| Model: SanDisk Cruzer (scsi)
#| Disk /dev/sdc: 4023MB
#| Sector size (logical/physical): 512B/512B
#| Partition Table: msdos
#| Number  Start  End     Size    Type     File system  Flags
#| ...
#| 1      32256B  2097446399B  2097414144B  primary  fat16        boot
#| 1      0cyl   254cyl  254cyl  primary  fat16        boot
#| 1      63s    4096574s  4096512s  primary  fat16        boot

label=syslinux # 10c max
sudo=sudo
time $sudo mkfs.vfat -F 16 -n "${label}" "${part}" && $sudo fsck.msdos -a -V -r ${part} # 1sec
sudo ms-sys -6 -p $PART # may avoid
sudo ms-sys -6 -w $PART

sudo mkdir -p /tmp/mnt/$PART
sudo umount $PART ; sudo mount $PART /tmp/mnt/$PART ; ls /tmp/mnt/$PART

# copy slax or any distro
cd /tmp/mnt/$PART && sudo time unp /home/rzr/local/tmp/slax-6.1.2.tar 
cd ~ && sudo umount $PART ; sudo fsck.msdos -a -V -r ${PART}


DISK=/dev/sda
PART=/dev/sda1
sudo umount $PART ;  sudo  fsck $PART

sudo ms-sys -6 -p $PART
#| Start sector 63 (nr of hidden sectors) successfully written to /dev/sdc1
#| Physical disk drive id 0x80 (C:) successfully written to /dev/sdc1
#| Number of heads (255) successfully written to /dev/sdc1
#| FAT16 boot record successfully written to /dev/sdc1

umount $PART ; sync && sync && sync && kvm $DISK
#| gag: disk I/O Error
#| gag: Boot Error
#| syslinux: EBIOS load error Boot Error
sudo syslinux -d boot/syslinux $PART # for slax
sudo syslinux -sf $PART
#| file is read only, overwrite anyway (y/n) ? y

cd ~ ; sudo umount $PART ; 
sudo fsck.msdos -a -V -r ${PART}; sudo sync ; sudo sync ; sudo sync && sudo kvm ${DISK}

sudo ms-sys -6 -w $PART

LANG=C parted /dev/sdc -s unit b print unit cyl print unit s print
Model: SanDisk Cruzer (scsi)
Disk /dev/sdc: 4023385600B
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End          Size         Type     File system  Flags
 1      32256B  2097446399B  2097414144B  primary  fat16        boot

Model: SanDisk Cruzer (scsi)
Disk /dev/sdc: 489cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 489,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start  End     Size    Type     File system  Flags
 1      0cyl   254cyl  254cyl  primary  fat16        boot

Model: SanDisk Cruzer (scsi)
Disk /dev/sdc: 7858175s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Flags
 1      63s    4096574s  4096512s  primary  fat16        boot

working in qemu

ERROR : "Missing Operating System"

sudo aptitude install mbr
install-mbr /dev/$disk

GAG = OK : boot = Disk I/O Error

LANG=C fdisk -l /dev/sda 

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         122      976531    6  FAT16
Partition 1 does not end on cylinder boundary.


parted :

 1      0cyl      121cyl    121cyl    primary   fat16                démarrage
 1      64s         1953125s    1953062s    primary   fat16                démarrage
 1      32768B         1000000511B    999967744B     primary   fat16                démarrage



parted /dev/sda -s unit s print resize 1 63s 120cyl

ToDo

windows

single FAT16 partition

repartition

xubuntu howto

http://cdimage.ubuntu.com/xubuntu/releases/hardy/alpha-3/#hardy-desktop-i386.iso

ed2k://|file|hardy-alpha-3-desktop-i386.iso|585465856|6d83ab7173b629b4d01632ac2e2575d8|
ed2k://|file|xubuntu-7.10-desktop-i386.iso|593889280|0c10985d7ac8eb5202a5890582b3dcf9|
ed2k://|file|xubuntu-6.06.1-desktop-i386.iso|685314048|d4e0e990286ea21d11cc2453e8c368c0|
  mkdir -p ~/tmp/
  cd ~/tmp/

  wget ftp://ftp.free.fr/mirrors/ftp.xubuntu.com/releases/7.10/release/xubuntu-7.10-desktop-i386.iso

  sudo apt-get install ms-sys gnu-fdisk dosfstools syslinux mtools fatresize qemu

  lsusb
  # Bus 002 Device 002: ID 1b1c:1a90  

DEV=/dev/hda
PART=${DEV}1
ISO=xubuntu-6.06.1-desktop-i386.iso
IMG=${ISO}.img
MNT_ISO=~/mnt/iso
MNT_IMG=~/mnt/img

umount  ${PART}
mount | grep $DEV ; echo $? # should return 1

fdisk -l ${DEV}
  
cat ${DEV} | gzip --fast - > orig.img.gz

LANG=C fdisk ${DEV} << EOF;
p
d
1
n
p
1

+750M
a
1
t
6
n
p
2


w
EOF

mkfs.vfat -F 16 -n usbboot ${PART}

dd if=${PART} of=${IMG}
mkdir -p "${MNT_IMG}" "${MNT_ISO}"
sudo mount -o loop ${IMG} ${MNT_IMG}
sudo mount -o loop ${ISO} ${MNT_ISO}
cd ${MNT_ISO} 
cp -rfa \
 casper disctree dists install pics pool preseed .disk isolinux/* \
 md5sum.txt README.diskdefines ubuntu.ico casper/vmlinuz casper/initrd.gz \
 ${MNT_IMG}/
cp -rfa \
  casper/vmlinuz casper/initrd.gz \
 ${MNT_IMG}/
cd  ${MNT_IMG}

sed -e 's|/cdrom||g' -i syslinux.cfg

 wget http://pendrivelinux.com/downloads/U710fix.zip && unzip -o U710fix.zip
  wget http://www.fs-driver.org/download/Ext2IFS_1_11.exe # ext2 driver for windows may help
cd - ; umount "${MNT_IMG}" "${MNT_ISO}"
syslinux -sf ${IMG}
# qemu ${IMG}

Optimize Flash Life

  LABEL=HELIO_ROOT / ext2 defaults,errors=remount-ro,noatime 0 1 proc /proc none defaults 0 0 tmpfs /tmp tmpfs defaults,noatime 0 0 tmpfs /var/tmp tmpfs defaults,noatime 0 0 tmpfs /var/lock tmpfs defaults,noatime 0 0 tmpfs /var/log tmpfs defaults,noatime 0 0 tmpfs /var/run tmpfs defaults,noatime 0 0 tmpfs /etc/network/run tmpfs defaults,noatime 0 0 rm -f /etc/mtab && ln -s /proc/mounts /etc/mtab

Errors:

“Unknown keyword in syslinux.cfg” : http://syslinux.zytor.com/archives/2005-September/005838.html

ed2k://|file|xubuntu-7.10-desktop-i386.img|748468224|d4c37f7f948bcb61f82e18ba5c85e507|

ToDo: http://syslinux.zytor.com/

http://bugs.debian.org/340703

Problems

On boot it starts this , how comes :

Intel UNDI pxe-20 (build 082)

Hang on :

Uniform CD-ROM driver Revision: 3.20 

http://osdir.com/ml/distributions.dynebolic.user/2006-10/msg00119.html

Buffer I/O error on device fd0 etc

boot

DISK=/dev/sda
PART=sda1
fdisk -ul $DISK | grep $PART | awk '{ print $3 }' | xargs -n 1 printf "0x%08llx\n"
0x3f # AA:BB:CC:DD @ 0x1C
0x000fb040 # usbboot

MS-SYS

MISC

MORE

liveusb.txt · Last modified: 2022/04/16 12:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki