anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#31
Still same problem with rox terminal crashing.
No message in terminal though.

When run as root (and sudo), works perfectly.
Posts: 19
m_pav
Joined: 12 Sep 2007
#32
Just tried the installer and script in Mepis 8.0.12-64, installed perfectly, worked perfectly after satisfying gtkdialog dependency.

This script may just work fine in most any Debian based distro with the installer set to check and install the dependency. Being iso based, it seems it has the capacity to make any iso image into a bootable thumb drive.

Mike P
Posts: 200
lagopus
Joined: 15 Oct 2008
#33
Thank you m_pav for the positive feedback.
Happy to know it works with Mepis 8.0 : I started the development on my laptop running Mepis 8.2, then switchted to my netbook on AntiX 8.2, but I did not test the latest version on Mepis.

miks:
I think m_pav gives a response to you answer: the gui needs gtkdialog, not installed by default on Mepis which is qt/kde-centered. There is no other need for libraries or system tools you would not find on any debian based system.

m_pav:
Resizing the system partition with gparted, copying another iso file in the partition, and editing the grub menu.lst, I can test/use different releases of antiX without burning CDs - this should work with other distros provided the kernel supports the fromiso cheatcode.

m_pav:
can you tell me the version/date-of-build of the scripts you use ( antix2usb(-gui).sh -v should work)
On Mepis, the messages are displayed in an xterm? can you confirm?

The gui miserably fails for anticapitalista, and I cannot guess why. Deep disappointment... I did the install from scratch with the latest tarfile, and for me it works.
Basically antix2usb.sh is launched by gksu from a roxterm started by antix2usb-gui.sh (simple!?), but this will not help: roxterm crashes with no message... parameters of the sh script faultly interpreted by the gksu or the roxterm command?
Posts: 9
miks
Joined: 26 Jul 2009
#34
Thanks guys.

OK. Installed in my squeeze install and tried launching from the terminal as ordinary user. Selected the iso and got this:

Code: Select all

mike@debian:~$ antix2usb-gui.sh
/usr/local/bin/antix2usb-gui.sh: line 838: /tmp/antix2usb.pid: Permission denied
mike@debian:~$ /usr/local/bin/antix2usb-gui.sh: line 636: kill: (8155) - No such process
rm: cannot remove `/tmp/antix2usb.pid': Operation not permitted
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#35
Does it work as root user?
Posts: 200
lagopus
Joined: 15 Oct 2008
#36
miks:
check this:

Code: Select all

$ ls -ld /tmp
$ ls -l /tmp/antix2usb.pid
I guess /tmp/antix2usb.pid has root owner
then as root:

Code: Select all

# rm /tmp/antix2usb.pid
Thanks for your help, guys
Got to refurbish this tool...
Posts: 9
miks
Joined: 26 Jul 2009
#37
Anti:
tried as root and got

Code: Select all

debian:/home/mike# antix2usb-gui.sh
debian:/home/mike# Invalid MIT-MAGIC-COOKIE-1 key
(gtkdialog:5048): Gtk-WARNING **: cannot open display: :0.0
Lagopus:

Code: Select all

mike@debian:~$ ls -ld /tmp
drwxrwxrwt 10 root root 4096 2009-11-19 15:46 /tmp
mike@debian:~$ ls -l /tmp/antix2usb.pid
ls: cannot access /tmp/antix2usb.pid: No such file or directory
mike@debian:~$
Posts: 19
m_pav
Joined: 12 Sep 2007
#38
I had to raise elephants last night as shutting down, must have been caught in an endless loop, text scrolling at alarming rates. Nothing seems to be remiss.

michael@mikepav:~$ antix2usb-gui.sh -v
antix2usb-gui.sh v0.2.2 2009-11-16
michael@mikepav:~$

confirmed that messages are displayed using xterm.

I ran the script last night as root, forgetting it needed to be tested as a regular user, then posted saying it worked. When I tried again this morning as a regular user, same as Anti, xterm crashed with no messages. Tried again as root, no problems.

Getting the gui to function when running the script as root is as easy as adding xhost + into the script as one of the first lines, but I'm sure you already knew that.


Now for a digression, possibly way too early in development to introduce, but when I test, I try to mimick the dumb things that will likely be tried with a tool like this one.

I tried a few variations to mimick the possible mistakes that would be introduced by the world at large and got expected results. Things like blanking out the partition size and unchecking the presistence option and another test was to select an iso bigger than the partition size.

Maybe a few background checks can be introduced into the script, where the device is queried early in the process and as a fallback to determine its storage capacity and the maximum size is inserted into the script if no options are given for the first scenario, and for the second, instead of an error message, a new size is chosen + a small margin for error with an accept/reject notification dialogue.

Mike P
Posts: 9
miks
Joined: 26 Jul 2009
#39
OK Guys, I decided to install to the hard drive on my vaio to make testing easier. Install went fine, and the wifi works oob this time. Installed fglrx with smxi and grabbed the latest antix2usb download. This time, I tried installing to my 8gb sandisk cruzer. I was trying it out with the lenny kde live iso, and all seemed to be going ok until I gor the same error as when I tried last time

Code: Select all

mike@vaio:~$ antix2usb-gui.sh -v
antix2usb-gui.sh v0.2.2 2009-11-16
mike@vaio:~$ antix2usb-gui.sh
/usr/local/bin/antix2usb-gui.sh: line 838: /tmp/antix2usb.pid: Permission denied
mike@vaio:~$ /usr/local/bin/antix2usb-gui.sh: line 636: kill: (23819) - No such process
rm: cannot remove `/tmp/antix2usb.pid': Operation not permitted
mike@vaio:~$ 
This is the log

Code: Select all

Log: antix2usb.sh Fri Nov 20 18:33:09 GMT 2009
Log: Device SanDisk  U3 Cruzer Micro  detected at /dev/sdb
Log: Preparing partitions on device /dev/sdb fs1=[ext2] fs2=[ext2]
Log: Clearing partition table
Log: Creating partition /dev/sdb1 fs: ext2 label: antiXlive
=================================== fdisk ========================================

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-1020, default 1): Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1020, default 1020): 
Command (m for help): Selected partition 1
Hex code (type L to list codes): 
Command (m for help): Partition number (1-4): 
Command (m for help): 
Disk /dev/sdb: 8036 MB, 8036285952 bytes
248 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15376 * 512 = 7872512 bytes
Disk identifier: 0x1e9ec87e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         137     1053225   83  Linux

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
=================================== done. ========================================
Log: Creating partition /dev/sdb2 fs: ext2 label: antiXdata
=================================== fdisk ========================================

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (138-1020, default 138): Using default value 138
Last cylinder, +cylinders or +size{K,M,G} (138-1020, default 1020): Using default value 1020

Command (m for help): Partition number (1-4): Hex code (type L to list codes): 
Command (m for help): 
Disk /dev/sdb: 8036 MB, 8036285952 bytes
248 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15376 * 512 = 7872512 bytes
Disk identifier: 0x1e9ec87e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         137     1053225   83  Linux
/dev/sdb2             138        1020     6788504   83  Linux

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
=================================== done. ========================================
Log: Creating file system on /dev/sdb1
Log: Creating file system on /dev/sdb2
Log: Prepared bootable partition: /dev/sdb1 label: antiXlive
Log: Prepared data partition: /dev/sdb2 label: antiXdata
Log: Mounting /dev/sdb1 on temporary mount point
Log: Mount point ready
Log: Installing grub on /dev/sdb
Installation finished. No error reported.
This is the contents of the device map /tmp/install-usb-key.f5hdH/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)    /dev/sda
(hd1)    /dev/sdb
Log: Grub successfully installed to /dev/sdb
Log: Copying files from iso: debian-live-501-amd64-kde-desktop.iso
Log: Mounting iso /media/disk1part9/data/isos/debian-live-501-amd64-kde-desktop.iso
Log: Iso mounted
Log: Copying files to /boot directory
Log: ... initrd
Error: 1 - Failed to copy file /tmp/install-usb-iso.qmbvB/boot/initrd to /tmp/install-usb-key.f5hdH/boot
Error: 1 - Failed to copy files to /tmp/install-usb-key.f5hdH/boot
Log: Unmounting /dev/sdb1 (please wait...)
Log: Mount point removed
Posts: 9
miks
Joined: 26 Jul 2009
#40
Just to let you know that I installed antiX-M8.5-full-test1 to the cruzer usb drive from the antiX-M8.5-full-test1 hard drive install. It went well and I have tried the persist for various changes and rebooted it and it works good.......

I guess that previous failed attempts to use a live debian iso must be related to the way the debian iso is put together?
Posts: 200
lagopus
Joined: 15 Oct 2008
#41
mike:
I was just about to suggest that the layout of the debian iso is not the same that antiX' one.
the log says that the initrd file is not found on the iso.
I suppose that the script should work with a Mepis iso (not tested).
I am sure it will not work with a ?buntu iso.

m_pav:
I tried a few variations to mimick the possible mistakes that would be introduced by the world at large and got expected results. Things like blanking out the partition size and unchecking the presistence option and another test was to select an iso bigger than the partition size.
Thank you for these tests!
But the gui is not totally dumb-proof: what happens if you enter"hello" in the partition size?

I am working on the troubles that some of us experienced with the running-as-simple-user/gksu problem.
I am about to revert to a python-gtk gui.
My intention was to keep-it-simple - just a minimal set of options - using gtkdialog, but in fact, willing to manage the error cases, to have feedback during the installation, I had to use some ugly tricks, and the script is unmaintainable.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#42
lagopus, running the script-gui as sudo or root worked fine. The 'problems' only started when you tried to avoid that and use gksu.
I think gksu is also having some problems with dbus.

I did get the script to work in antiX-base without sudo (ie as is), but it didn't work when run from an installed antiX. Maybe this is the heart of the problem?
Posts: 9
miks
Joined: 26 Jul 2009
#43
I've been playing with this for a bit now with mixed results. I installed lxde on the flash drive and then used it to install to the Travelmate hdd.

Although the components for lxde are there in the hdd install, as I can run eg. pcmanfm, the lxde desktop cant be selected at the slim login screen, as it drops me back to tty1. In icewm, the menu is missing most of the entries although there is a config file /.icewm/application which it seems should control the menu in the home directory, but doesnt?

Next I installed kde 4 full to the usb after commenting out the lenny entry in sources.list. After this, the keyboard has gone haywire even in tty1 so I cannot use the usb to install any more. I tried the en_GB cheat code but that did not help. Is there a config file on the usb drive somewhere that I can edit to get the keyboard back to normal?

Overall, things seemed to be very sluggish running from the usb, even in icewm. I had sidux kde4 lite on it before and that seemed quite nippy.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#44
I've been working with anticapitalista on the linuxrc boot script (added the persistence and a few other things). I have a couple of comments and suggestions regarding the antix2usb script. I hope this isn't too much information all at once, too late. I was"holding the line" and then I got caught up in building a new computer and getting the latest linuxrc to anti.

First, the cheatcode"fromhd=UUID=something" does exactly the same thing as just"fromhd". You can however specify a device directly such as"fromhd=/dev/sdc1". But this is not portable so it should not be used IMO. I would like to get"fromhd=UUID=something" working but it involves upgrading the busybox program in our initrd so that it supports either the blkid command or the -L and -U options in the mount command. So for now, specifying the UUID is just a waste of space and a source of confusion. Other distributions (such as Sidux) have a very different initrd and they do support the UUID option to fromhd.

Second, I got rid of the aufs cheatcode. Using aufs is now the default behavior. If you want to turn it off there is now a noaufs cheat code. The peristent root will not work without aufs and even without a persistent root, you will usually get a bunch of error messages if aufs is disabled.

Third, as I mentioned before, I think it is a bad idea to mount the same device at more than one location in the file system. This would happen when the"rootfs" and"homefs" cheat codes pointed to the same device. I just added some code to linuxrc that prevents homefs from mounting if its device is already mounted. If the"rootfs" file system gets mounted, the /home/ directory is automatically persistent so there is almost no need to be able to mount"rootfs" and"homefs" on the same device.

Finally, there are three things I think are very desirable to be able to do with a LiveUSB:
  1. Have several OSes on the same stick, such as Mepis, antiX, antiX-base, and 64-bit Mepis.
  2. Easily boot the LiveUSB from a CD.
  3. Easily remaster the squashfs file system on the LiveUSB.
This can almost all be done by just changing how we copy files from the ISO file system to the USB. I've already presented these ideas
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://mepislovers.org/forums/showthread.php?p=193918#post193918"
linktext was:"here"
====================================
and I created a modified version of the antix2usb.sh script which is available
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://mepislovers.org/forums/showthread.php?t=23291"
linktext was:"here"
====================================
. The modified script also has a bunch of other modifications to updated the linuxrc script inside of initrd.gz but these are no longer needed so I will outline which modifications would still be useful.
  1. Create a $USB_MNT_PNT/boot/$DISTRO/ directory and put the vmlinux and initrd.gz files in it instead of in the $USB_MNT_PNT/boot/ directory. This makes it easy to boot several OSes from the same partition.
  2. Copy the /$ISO_MNT_PNT/mepis/mepis squashfs file directly instead of copying the entire iso file. This file should be copied to a file called $USB_MNT_PNT/boot/$DISTRO/squashfs. Using the squashfs file directly is marginally smaller than using an iso file. More importantly, this makes remastering easier because you simply replace the squashfs file with an new one and you don't have to mess around with recreating an iso file with a new /mepis/mepis squashfs file inside of it. This also puts all of the $DISTRO specific files in the same directory.
  3. Make the appropriate changes when creating the menu.lst file. I've added a"bootdir" cheatcode that makes it easier to specify the location of the squashfs file. Using"bootdir=$DISTRO" is equivalent to using"image_dir=boot/$DISTRO image_name=squashfs". The bootdir cheatcode would be used instead of the fromiso cheatcode. An entry that looked like:

    Code: Select all

    kernel /boot/vmlinuz aufs fromhd=UUID=$UUID fromiso=$ISOFILE ...
    initrd /boot/initrd.gz
    would become:

    Code: Select all

    kernel /boot/$DISTRO/vmlinuz bootdir=$DISTRO ...
    initrd /boot/$DISTRO/initrd.gz
    I haven't been using the"fromhd" cheatcode at all. It does change the order in which devices are searched. It would be trivial to make the"bootdir" cheatcode automatically imply the"fromhd" cheatcode.
  4. I made a couple of other convenience changes to help support creating a LiveUSB with several OSes on it.
    1. I changed the default behavior to not format the USB stick. I require a -format option in order to format. This might be improved by looking for the $USB_MNT_PNT/boot/grub directory and not formatting (without the -format option) if it is found.
    2. I don't overwrite the menu.lst file. If it already exists, I just append entries to it, assuming the header info (gfxmenu, etc) is already there. In addition, (although you may not need this) I grep the menu.lst file for"/$DISTRO/" and if that string is found I assume the entries already exist and I don't bother appending. There is a minor bug in the antix2persist-usb.sh file available via the link above. It doesn't have the leading and trailing slashes in the search pattern. It just searches for"$DISTRO" so"antiX-M8.2" will match"/boot/antiX-M8.2-base/vmlinuz". Adding the leading and trailing slashes fixes this problem.
    3. I don't run grub again if the $USB_MNT_PNT/boot/grub directory already exists. This speeds things up a trifle and it also makes it so the grub background image does not get changed each time the script is run. Perhaps one could look for the $USB_MNT_PNT/boot/grub/message file instead so if a user wants to change the background, they can just delete that file.
With these modifications, if you want to install several OSes on the same USB stick, you just run the install program multiple times and only specify -format the first time it is run. I've been using this file layout and creation script for my linuxrc development work over the last six weeks and it seems solid and I always put more then one OS on each USB stick I use.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#45
@miks, I don't know how to fix your lxde problem, but I can chime in on the other two problems you reported.
miks wrote:Next I installed kde 4 full to the usb after commenting out the lenny entry in sources.list.
Wow. A++ for coming up with a great test. I'm sorry we failed it so miserably.
After this, the keyboard has gone haywire even in tty1 so I cannot use the usb to install any more. I tried the en_GB cheat code but that did not help. Is there a config file on the usb drive somewhere that I can edit to get the keyboard back to normal?
You can probably still boot the usb stick fine if you just get rid of the rootfs cheatcode. But you might want to change"rootfs" to"homefs" instead so it will mount what used to be your persistent root on /home so the changed part of the /etc/ directory will show up as /home/etc/ and so on.

I'm not certain how kde-4 is set up in Debian but if kde-3 on Mepis can be used as a guide, it is the /etc/init.d/kdm script that starts up kde. You could try putting an"exit" command near the top of that script. A less severe alternative is to edit /etc/X11/default-display-manager and making sure that it contains"/usr/bin/slim" not"/usr/bin/kdm". If you are lucky, this will get you to slim instead of kdm. A third alternative is to try using the"nogui" cheatcode. This will normally prevent X from even starting but I don't know if it will work with kde-4. So I guess these alternatives should probably be tried in reverse order, starting with the"nogui" cheatcode.

Does anyone know if we get the same problem after installing kde-4 on an installed antiX system?
Overall, things seemed to be very sluggish running from the usb, even in icewm. I had sidux kde4 lite on it before and that seemed quite nippy.
I've seen this too. there was a recent change to linuxrc that mouns the persistent root filesystem with the noatime option which did seem to speed things up a bit. Once you can boot with a persistent root again, try running"mount | grep noatime". If there is an output then the noatime fix was already applied to the linuxrc you are using which means we don't have a quick fix for you. If nothing shows up then you can trying adding the noatime option and see if that improves performance. You would add it with the following two commands:

Code: Select all

# mount -o remount,noatime /persist-root
# mount -o remount,noatime /aufs
If noatime does not fix this problem, I just don't know what is causing it. Anti says that if the persistent rootfs is on a hard drive, the massive slowdown goes away (it was massive before the noatime fix). I think ext2 could be substantially faster than ext3, or other journalling file systems. About a year or so ago, Linus reported that some flash memory has random write speeds as low as 10 per second! So I think this is what is causing our performance problem. After using noatime and turning off journalling, the only thing I can think of is to mount some directories (such as /var/log) on ramdisk instead of the persistent partition.

If the slowdown problem gets worse after you install a lot of new packages, then one way we can ameliorate it is by remastering the LiveUSB which would be done by move almost everything that is in the rootfs persistent file system into the read-only squashfs file.

Note: You really should fsck the persistent partition if you had to power down the system because you couldn't log in to shut it down gracefully. One way to do this is to remove the"rootfs" cheatcode and boot into the generic system (it is important that the partition you want to fsck is not mounted). Then you can find the name of the device by running"blkid -t LABEL=$label" where $label is the same label you used with the"rootfs" cheatcode. This will work with a UUID as well using UUID=... Then you simply"fsck $device" where $device is the /dev/whatever returned by the blkid program. Maybe you already knew all or most of this but I wasn't sure that you did and I figured it was better to be safe than sorry.