SR 2.2.0 ./usb_inst.sh fails to write
SR 2.2.0 ./usb_inst.sh fails to write
I tried to use your recommended method of installing SR 2.2.0 on a USB stick on Gentoo. I've tried several times, but run into the same problem each time:
root:547 sr> bash ./usb_inst.sh /dev/sdb1
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
./usb_inst.sh: SystemRescueCd installation script for USB-sticks
Syntax: ./usb_inst.sh <command> ...
Please, read the manual for help about how to use this script.
http://www.sysresccd.org/Online-Manual-EN
[ I have done that ]
You can either run all sub-commands in the appropriate order, or you can just use the semi-graphical menu which requires less effort:
A) Semi-graphical installation (easy to use):
Just run "./usb_inst.sh dialog" and select the USB device
B) Sub-commands for manual installation (execute in that order):
1) listdev Show the list of removable media
2) writembr <devname> Recreate the MBR + partition table on the stick
3) format <partname> Format the USB-stick device (overwrites its data)
4) copyfiles <partname> Copy all the files from the cdrom to the USB-stick
5) syslinux <partname> Make the device bootable
C) Extra sub-commands:
-h|--help Display these instructions
[ I try 'A']
root:548 sr> bash ./usb_inst.sh dialog /dev/sdb1
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
Device [/dev/sdb] detected as [Kingston DataTraveler 2.0] is removable and size=1968MB
[Graphic comes up, I hit OK, it exits with message ... ]
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
[Nothing has been written on the stick, so I try 'B']
root:554 sr> bash ./usb_inst.sh writembr /dev/sdb
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
The device [/dev/sdb] seems to be big enough: 1968 MB.
usb_inst.sh: error: install-mbr and parted must be installed, check these programs first.
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
[Still nothing written on stick & I have 'parted' installed ... ]
root:555 sr> eix parted
[D] sys-block/parted
Available versions: 2.3 ~2.3-r1 ~2.3-r2 ~2.4 [M]~3.0 {+debug device-mapper nls readline selinux static-libs}
Installed versions: 2.3-r1([2011-03-07 05:41:43])(device-mapper readline -debug -nls -selinux)
Homepage: http://www.gnu.org/software/parted
Description: Create, destroy, resize, check, copy partitions and file systems
['install-mbr' is not a Gentoo pkg]
If I use Unetbootin, the stick is written promptly & easily, but I run into the problem described in Forum Topic 3143 :
http://www.sysresccd.org/forums/viewtop ... =14&t=3143
The solution offered there -- to copy 'syslinux.cfg' from a version < 1.5.2 -- works for me (I used 1.3.1).
That topic ended more than 1 year ago & I am surprised that the problem hasn't been fully resolved yet.
Otherwise I'm very pleased with SR 2.2.0 , once I've got it to work (smile).
root:547 sr> bash ./usb_inst.sh /dev/sdb1
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
./usb_inst.sh: SystemRescueCd installation script for USB-sticks
Syntax: ./usb_inst.sh <command> ...
Please, read the manual for help about how to use this script.
http://www.sysresccd.org/Online-Manual-EN
[ I have done that ]
You can either run all sub-commands in the appropriate order, or you can just use the semi-graphical menu which requires less effort:
A) Semi-graphical installation (easy to use):
Just run "./usb_inst.sh dialog" and select the USB device
B) Sub-commands for manual installation (execute in that order):
1) listdev Show the list of removable media
2) writembr <devname> Recreate the MBR + partition table on the stick
3) format <partname> Format the USB-stick device (overwrites its data)
4) copyfiles <partname> Copy all the files from the cdrom to the USB-stick
5) syslinux <partname> Make the device bootable
C) Extra sub-commands:
-h|--help Display these instructions
[ I try 'A']
root:548 sr> bash ./usb_inst.sh dialog /dev/sdb1
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
Device [/dev/sdb] detected as [Kingston DataTraveler 2.0] is removable and size=1968MB
[Graphic comes up, I hit OK, it exits with message ... ]
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
[Nothing has been written on the stick, so I try 'B']
root:554 sr> bash ./usb_inst.sh writembr /dev/sdb
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
The device [/dev/sdb] seems to be big enough: 1968 MB.
usb_inst.sh: error: install-mbr and parted must be installed, check these programs first.
rmdir: failed to remove `/var/tmp/usb_inst.tmp': Directory not empty
[Still nothing written on stick & I have 'parted' installed ... ]
root:555 sr> eix parted
[D] sys-block/parted
Available versions: 2.3 ~2.3-r1 ~2.3-r2 ~2.4 [M]~3.0 {+debug device-mapper nls readline selinux static-libs}
Installed versions: 2.3-r1([2011-03-07 05:41:43])(device-mapper readline -debug -nls -selinux)
Homepage: http://www.gnu.org/software/parted
Description: Create, destroy, resize, check, copy partitions and file systems
['install-mbr' is not a Gentoo pkg]
If I use Unetbootin, the stick is written promptly & easily, but I run into the problem described in Forum Topic 3143 :
http://www.sysresccd.org/forums/viewtop ... =14&t=3143
The solution offered there -- to copy 'syslinux.cfg' from a version < 1.5.2 -- works for me (I used 1.3.1).
That topic ended more than 1 year ago & I am surprised that the problem hasn't been fully resolved yet.
Otherwise I'm very pleased with SR 2.2.0 , once I've got it to work (smile).
Re: SR 2.2.0 ./usb_inst.sh fails to write
The key to the problem ist that /var/tmp/usb_inst.tmp
is not removable.
As root this shold not happen.
Check the result of "ls -la /var/tmp"
In my system it points to /tmp:
lrwxrwxrwx 1 root root 4 May 15 2007 /var/tmp -> /tmp
In this case check /tmp
Is there a entry "usb_inst.tmp" ?
Try to remove it.
Look for special flags or run fsck if removing fails.
dmesg shows hardwareproblems.
Gernot
is not removable.
As root this shold not happen.
Check the result of "ls -la /var/tmp"
In my system it points to /tmp:
lrwxrwxrwx 1 root root 4 May 15 2007 /var/tmp -> /tmp
In this case check /tmp
Is there a entry "usb_inst.tmp" ?
Try to remove it.
Look for special flags or run fsck if removing fails.
dmesg shows hardwareproblems.
Gernot
Re: SR 2.2.0 ./usb_inst.sh fails to write
Thanks for your prompt reply. The problem seems to be that /var/tmp is sticky :
drwxrwxrwt 6 root root 816 Jun 19 01:41 tmp
It's not a symlink to /tmp nor would I want it to be.
I will unstick /var/tmp & see if I can test the script again with another USB stick.
drwxrwxrwt 6 root root 816 Jun 19 01:41 tmp
It's not a symlink to /tmp nor would I want it to be.
I will unstick /var/tmp & see if I can test the script again with another USB stick.
Re: SR 2.2.0 ./usb_inst.sh fails to write
I tested it again (see previous msg) & it still fails as before. 'ls -l /var/tmp' now gives
drwxrwxrwx 6 root root 816 Jun 19 02:05 tmp
but the script exits with the same 'nocando' msg.
I tried removing /var/tmp/usb_inst.tmp/install_mbr by hand & checked it had gone with 'ls -l',
but the script still complains as before & has in fact re-created the dir & the file.
Why is the script doing that, if it in fact wants to delete it ?
drwxrwxrwx 6 root root 816 Jun 19 02:05 tmp
but the script exits with the same 'nocando' msg.
I tried removing /var/tmp/usb_inst.tmp/install_mbr by hand & checked it had gone with 'ls -l',
but the script still complains as before & has in fact re-created the dir & the file.
Why is the script doing that, if it in fact wants to delete it ?
Re: SR 2.2.0 ./usb_inst.sh fails to write
Now i understand your problem. Its not the directory, but the file install_mbr in it that makes the problem.
are you sure with install_mbr because the file in usb_inst is install-mbr.
This file with - is also the removed.
---snip----
rm -rf ${TMPDIR}/{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
rmdir ${TMPDIR}
------
please post the output from mount and
ls -la /var/tmp/usb_inst.tmp
Gernot
are you sure with install_mbr because the file in usb_inst is install-mbr.
This file with - is also the removed.
---snip----
rm -rf ${TMPDIR}/{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
rmdir ${TMPDIR}
------
please post the output from mount and
ls -la /var/tmp/usb_inst.tmp
Gernot
Re: SR 2.2.0 ./usb_inst.sh fails to write
Here is the requested output.
I use /z/sysres/sr-2.2.0/ to mount the ISO : /z/ is a large space I use for temporary stuff.
The dir /var/tmp/usb_inst.tmp/ did not exist before I ran the script usb_inst.sh .
It looks as if the problem is a typo in the script, confusing '-' with '_' : I'll also try editing the script & report what happens.
root:516 sr-2.2.0> mount
rootfs on / type rootfs (rw)
/dev/root on / type reiserfs (rw,noatime,notail)
none on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
none on /dev/shm type tmpfs (rw,relatime)
/dev/mapper/lvm-home on /home type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-usr on /usr type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-local on /usr/local type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-opt on /opt type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-pix on /home/purslow/pix type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-portage on /usr/portage type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-src on /usr/src type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-tmp on /tmp type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-var on /var type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-z on /z type reiserfs (rw,noatime,notail)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/usr/local/src/systemrescuecd-x86-2.2.0.iso on /z/sysres/sr-2.2.0 type iso9660 (ro)
root:517 sr-2.2.0> ls -la /var/tmp/usb_inst.tmp/
total 228
drwxr-xr-x 2 root root 80 Jun 20 00:07 .
drwxrwxrwt 5 root root 464 Jun 20 00:07 ..
-rwxrwxrwx 1 root root 231088 Jun 20 00:07 install_mbr
root:518 sr-2.2.0>
I use /z/sysres/sr-2.2.0/ to mount the ISO : /z/ is a large space I use for temporary stuff.
The dir /var/tmp/usb_inst.tmp/ did not exist before I ran the script usb_inst.sh .
It looks as if the problem is a typo in the script, confusing '-' with '_' : I'll also try editing the script & report what happens.
root:516 sr-2.2.0> mount
rootfs on / type rootfs (rw)
/dev/root on / type reiserfs (rw,noatime,notail)
none on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
none on /dev/shm type tmpfs (rw,relatime)
/dev/mapper/lvm-home on /home type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-usr on /usr type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-local on /usr/local type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-opt on /opt type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-pix on /home/purslow/pix type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-portage on /usr/portage type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-src on /usr/src type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-tmp on /tmp type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-var on /var type reiserfs (rw,noatime,notail)
/dev/mapper/lvm-z on /z type reiserfs (rw,noatime,notail)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/usr/local/src/systemrescuecd-x86-2.2.0.iso on /z/sysres/sr-2.2.0 type iso9660 (ro)
root:517 sr-2.2.0> ls -la /var/tmp/usb_inst.tmp/
total 228
drwxr-xr-x 2 root root 80 Jun 20 00:07 .
drwxrwxrwt 5 root root 464 Jun 20 00:07 ..
-rwxrwxrwx 1 root root 231088 Jun 20 00:07 install_mbr
root:518 sr-2.2.0>
Re: SR 2.2.0 ./usb_inst.sh fails to write
I edited the script to remove the file as named with '_' & the error msgs disappeared, but there was no further result
(of course, I copied the content of the ISO to another writable dir & ran everything from there).
I then ran the script adding 'writembr /dev/sdb' & got the error msg re missing pgms described in my OP.
So perhaps we should note that there's a typo in the script & now shift attention to the latter problem (smile).
(of course, I copied the content of the ISO to another writable dir & ran everything from there).
I then ran the script adding 'writembr /dev/sdb' & got the error msg re missing pgms described in my OP.
So perhaps we should note that there's a typo in the script & now shift attention to the latter problem (smile).
Re: SR 2.2.0 ./usb_inst.sh fails to write
I dont think its a Typo. Check the files in usb_inst. On my CD all is ok.
Mayby - is translated to _ while copying.
What filesystem use you for copy and tmp?
Gernot
Mayby - is translated to _ while copying.
What filesystem use you for copy and tmp?
Gernot
Re: SR 2.2.0 ./usb_inst.sh fails to write
Really, you're not making much sense: I've never heard of such a miscopying. FWIW I use ReiserFS for all my partitions except /boot .
Does anyone else have anything useful to say re this problem ?
Does anyone else have anything useful to say re this problem ?
Re: SR 2.2.0 ./usb_inst.sh fails to write
Yes. It dont make much sense, but how get install-mbr to install_mbr
View the facts and check your usb stick:
Try to rename the file on the stick if it is wrong.
My usbstick:
g:~ > l /mntusb1/usb_inst
total 1596
-rwxr-xr-x 1 g users 330400 Jun 6 20:11 dialog
-rwxr-xr-x 1 g users 231088 Jun 6 20:11 install-mbr
-rwxr-xr-x 1 g users 237896 Jun 6 20:11 mkfs.vfat
-rwxr-xr-x 1 g users 306016 Jun 6 20:11 mtools
-rwxr-xr-x 1 g users 278072 Jun 6 20:11 parted
-rwxr-xr-x 1 g users 238920 Jun 6 20:11 syslinux
The code to copy:
-------------------------------
mkdir -p ${TMPDIR} || die "Cannot create temp directory: ${TMPDIR}"
if ! cp -r ${PROGLOC}/usb_inst/* ${TMPDIR}/
...
-----------------------------
The code to cleanup:
-----------------------------
cleanup_tmpdir()
{
if [ -d "${TMPDIR}" ]
then
rm -rf ${TMPDIR}/{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
rmdir ${TMPDIR}
fi
}
-----------------------------
View the facts and check your usb stick:
Try to rename the file on the stick if it is wrong.
My usbstick:
g:~ > l /mntusb1/usb_inst
total 1596
-rwxr-xr-x 1 g users 330400 Jun 6 20:11 dialog
-rwxr-xr-x 1 g users 231088 Jun 6 20:11 install-mbr
-rwxr-xr-x 1 g users 237896 Jun 6 20:11 mkfs.vfat
-rwxr-xr-x 1 g users 306016 Jun 6 20:11 mtools
-rwxr-xr-x 1 g users 278072 Jun 6 20:11 parted
-rwxr-xr-x 1 g users 238920 Jun 6 20:11 syslinux
The code to copy:
-------------------------------
mkdir -p ${TMPDIR} || die "Cannot create temp directory: ${TMPDIR}"
if ! cp -r ${PROGLOC}/usb_inst/* ${TMPDIR}/
...
-----------------------------
The code to cleanup:
-----------------------------
cleanup_tmpdir()
{
if [ -d "${TMPDIR}" ]
then
rm -rf ${TMPDIR}/{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
rmdir ${TMPDIR}
fi
}
-----------------------------
Re: SR 2.2.0 ./usb_inst.sh fails to write
It looks as if I have the same problem. Running the script gives the message 'failed to remove /var/tmp/usb_stick as it is not empty. Inside is syslinux and when I remove it and subsequently remove usb_stick successfully I get the same message again when I run the script. This means that the script seems to generate usb_stick/syslinux.
This happens on a desktop as well as a netbook both with Ubuntu 12.04.
P.S. When I use dialog working with the CD and press OK nothing happens and I have to use the manual sequence to get a working usb stick. Yes I finally got one again.
Please comment
Hein van Dam
This happens on a desktop as well as a netbook both with Ubuntu 12.04.
P.S. When I use dialog working with the CD and press OK nothing happens and I have to use the manual sequence to get a working usb stick. Yes I finally got one again.
Please comment
Hein van Dam
Re: SR 2.2.0 ./usb_inst.sh fails to write
Which sysrcd version use you.
I have no ubutu installation but read a time ago that the Ubuntu USB automounter make problems with some install scripts.
Gernot
I have no ubutu installation but read a time ago that the Ubuntu USB automounter make problems with some install scripts.
Gernot
Re: SR 2.2.0 ./usb_inst.sh fails to write
Hi!
I just found the same problem of rmdir but fortunatelly the reason was easy: the usb_inst directory in the disk image (latest 3.0.0) contains:
But the script in the line 62 deletes:
{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
So the file syslinux.exe is not deleted and the line 63 fails as the directory is not empty.
The solutions are:
a) Remove the syslinux.exe from the usb_inst/ directory
b) Change the line 62 of the script to:
This second option is what I have tried and works well (but I suspect that the problem is the syslinux.exe in a script oriented to a linux environment)
I hope this helps!
I just found the same problem of rmdir but fortunatelly the reason was easy: the usb_inst directory in the disk image (latest 3.0.0) contains:
Code: Select all
ls usb_inst
dialog install-mbr mkfs.vfat mtools parted syslinux syslinux.exe
{parted,install-mbr,mkfs.vfat,syslinux,dialog,mtools,mcopy,mattrib,mmove}
So the file syslinux.exe is not deleted and the line 63 fails as the directory is not empty.
The solutions are:
a) Remove the syslinux.exe from the usb_inst/ directory
b) Change the line 62 of the script to:
Code: Select all
rm -rf ${TMPDIR}/{parted,install-mbr,mkfs.vfat,syslinux,syslinux.exe,dialog,mtools,mcopy,mattrib,mmove}
I hope this helps!
Re: SR 2.2.0 ./usb_inst.sh fails to write
This bug should be fixed in the latest beta version
Re: SR 2.2.0 ./usb_inst.sh fails to write
Hi killerrex, i think i have the same problem (you can find the thread i've open there: http://www.sysresccd.org/forums/viewtop ... 80&p=13822 ).
Can you explain to me how to properly create the new iso?
I've done that:
* uncompressed systemrescuecd-x86-3.0.0.iso
* edited usb_inst.sh
* used genisoimage to create an iso from the folder
The app start when launching usb_inst.sh, but stop after i enter ok when chosing the drive, bringing me back to the prompt.
I don't know if i'm using aright genisoimage.
Can you explain to me how to properly create the new iso?
I've done that:
* uncompressed systemrescuecd-x86-3.0.0.iso
* edited usb_inst.sh
* used genisoimage to create an iso from the folder
The app start when launching usb_inst.sh, but stop after i enter ok when chosing the drive, bringing me back to the prompt.
I don't know if i'm using aright genisoimage.