Remastersys and AVLinux Forum
May 21, 2013, 10:46:51 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Remastersys 3.0.4-2 for Ubuntu Lucid and Newer including Quantal Released
 
   Home   Remastersys Home Remastersys downloads Donate Login Register AV LINUX Home Help Search  
Pages: [1]
  Print  
Author Topic: HowTO: Create a Persistent AV Linux USB Key with -rt Kernel  (Read 8539 times)
0 Members and 1 Guest are viewing this topic.
GMaq
Administrator
Hero Member
*****
Offline Offline

Posts: 2160


A/V 'Nixer


WWW
« on: February 04, 2010, 11:09:20 AM »

AV Linux Persistent USB Key with Realtime Kernel

Requirements:

PC Capable of booting from USB Key
At least 2GB USB Key (4GB Recommended)
Latest AV Linux ISO image from here: http://www.bandshed.net/AVLinux.html
Unetbootin

This guide is written assuming you are using an existing AV Linux install, however any current distro with GParted and Unetbootin will work. This operation will utilize the entire USB Key so use a key you don't want to share data on other computers with and remove any important data from the key. I would also suggest you use a clean key without any U3 or other proprietary launching software on it, most manufacturers provide utilities to remove this.

STEP 1.
Insert your USB Key into the USB Port but don't mount it in PCManFM. From the menu go to 'Preferences'-->GParted and launch GParted.

STEP 2.
Using the drop down dialog in the upper right corner of GParted select your USB Key. MAKE SURE YOU KNOW WHICH DRIVE YOUR USB KEY IS!!

STEP 3. (DO WITH CAUTION)

Select any existing Partitions on the Key, Right Click on them and delete them until the Key is completely unallocated space.

STEP 4.
Create a new FAT32 partition on the USB Key at least 2.0 Gigabytes (2048 mb). In the remaining unpartitioned space create an ext2 or ext3 partition and in the 'label' field enter 'live-rw'.

STEP 5.
Click on the checkmark icon at the top of GParted and apply the partitions you have created to the key.

STEP 6.
Once GParted has finished creating your new partitions right click on the FAT32 Partition and select 'Manage Flags' and from the list select 'boot'. When you close the Flags dialog Gparted should quickly rescan and display the boot flag on your FAT32 Partition. Close GParted

STEP 7.
Remove your USB Key and then plug it back in. Then open PCManFM...you should see 2 partitions available to mount relating to your USB Key, you can mount them both but you only need to mount the FAT32 one. Hint... it is the one not called 'live-rw'.

STEP 8.
From the menu open 'System Tools'--->Unetbootin. Select the Diskimage option and navigate to where you have downloaded or placed the avlinux3r1-20100201-lxde-i386-en.iso file and Click OK. Unetbootin will take several minutes to copy the image and bootloader to your Key.

If you simply want AV Linux on a USB Key without persistent storage you can stop here. This will give you the partition AV Linux runs from and a small additional partition to store files on while you are running it. For persistence there are a few more steps and a few things to consider:

- Persistence will dramatically slow bootup time to a couple of minutes at least.
- Persistence causes the system response to be a little slower than a non-persistent Key but faster than a DVD ROM
- Installing AV Linux from a persistent Key is NOT advised.
- During shutdown the GDM login may appear briefly, it doesn't need a password and will disappear on it's own.
- System shutdown is kind of kludgy and displays several harmless errors, do not remove your key when prompted until it stops flashing.

NOT SCARED OFF?

STEP 9.
Mount the FAT 32 Partition of your Key (if it isn't already) in PCManFM and navigate to the 'syslinux.cfg' file. Right click on it and open it in gedit and modify it's text in line 9 like the example below, once done save the edited syslinux.cfg file and you are ready to boot into your new Key. Enjoy!
 
Code:
append initrd=/ubninit file=/cdrom/preseed/custom.seed boot=live quiet splash vga=788 persistent --
« Last Edit: September 27, 2010, 08:54:42 AM by GMaq » Logged

AV Linux, Proudly created with Remastersys: http://www.bandshed.net/AVLinux.html
varpa
Hero Member
*****
Offline Offline

Posts: 333


« Reply #1 on: March 03, 2010, 09:04:06 PM »

I had a problem creating the partitions on my USB drive.  I found I had to create them one at a time rather than both at once as this howto describes.  That is, I had to make a "new" partition, then click the check button to execute the action, then create the 2nd partition and click the check button.   After that everything else proceeded normally, and now I am happily running AVLinux from my USB drive.
Logged
varpa
Hero Member
*****
Offline Offline

Posts: 333


« Reply #2 on: March 04, 2010, 03:02:49 PM »

I have tried out the USB key version of AVLinux for a day which is great, though I've come to learn it has some major limitations (I think).  I see that my AVLinux is running in some ramdisk (just like when you boot from a live CD) and therefore there is no permanent storage on the USB, ie. changes to settings are not preserved between boots.   I was also puzzling what the passwords were for the the user "tester" and "root" for that matter.   I do not really see what the live-rw partition is for, as it is not even mounted automatically.  Or is it just some scratch area for miscellaneous use?

Also, I was thinking I could use my laptop hard drive for my actual projects.   I have an ext3 partition which is /home for my existing Mandriva installation.  However, the user "tester" naturally cannot write to the other partition and I'm not sure how to set this up, especially since I do not know the root password.   It seems like perhaps I could set up a user with the same uid and gid so file ownership would be the same in Mandriva/AVLinux (but it may be trickier than this?)

So it looks like I need to install AVLinux to my harddrive in order to get  full functionality.  This is a pain as my laptop harddrive already heavily subscribed.  Is my assessment correct?  Thanks.
Logged
GMaq
Administrator
Hero Member
*****
Offline Offline

Posts: 2160


A/V 'Nixer


WWW
« Reply #3 on: March 04, 2010, 05:08:55 PM »

Hi,

I deleted your post in the other section, in the future please don't double post, I read all posts in all sections, so if in doubt post once and I'll move it if I need to. :grin:

You are correct that booting a LiveUSB key is the same as a LiveCD/DVD so the squashfs uncompresses and runs in your RAM, however the persistent feature means that the ext3 partition should be seen and automounted during the Live session and all your config data should be written to the live-rw partition just like a home partition in a regular install. It would appear that the persistence feature is not functioning as it should be or is set up incorrectly. This simple test should tell you if it's working:

1. Run a live session off your USB Key
2. Create a new folder on the Live user's home folder
3. Shutdown the session and reboot
4. If there is no new folder in the live user's home on the next boot then persistence is not working, On my test USB Key this guide works with persistence

Running a USB Key in non persistent mode and mounting all partitions using the Remastersys Control Panel to 'mount all partitions now' should mount all your partitions on your laptop with no permission issues, there is no password or need for a password when running from a Live session, that only comes into play in an install scenario, the Live session user has root authorization for most purposes.
Logged

AV Linux, Proudly created with Remastersys: http://www.bandshed.net/AVLinux.html
varpa
Hero Member
*****
Offline Offline

Posts: 333


« Reply #4 on: March 08, 2010, 01:36:15 PM »

Here is what I find: 

The tester home directory is located in the ramdisk so changes are not saved.  The live-rw partition is not mounted automatically, though you can save files to it which are kept between reboots.    I have to confess I have been using only a 2GB USB drive which is smaller than you recommend so maybe that causes this strange behavior.

Concerning writing to the harddisk as tester: Can write to my windows partition, can write to my linux root (/) partition, but cannot write to any of the user directories in my linux /home.   Perhaps I could create another directory in /home that tester could write to.

Also tried to install AVLinux to my 2GB USB drive, but discovered it was too small.   Ordered a bigger USB drive, though perhaps it is not a good idea to try to run from a USB drive which has limited read/writes, also maybe write speed is too slow to use for hard disk recording.  Lets  see: 44kHz * 2byte/sample = 88kB/s.  USB can write at 10MB/s so in principle you could use for HDR, but is probably not recommended since regular hard disks are ~50x faster.

Checked out the install to disk option - GParted detected the 2 partitions on the USB drive (with my AVLinux installation), but for some reason it did not detect any partitions on my hard drive (currently set up for dual boot Mandriva/Windows).   Hence, I do not see how I could ever install to my hard drive if GParted requires re-initializing the entire hard drive every time.  I would want control over what partitions are used so I could keep other OS installations.

Maybe it would be best to find an external hard drive to run AVLinux.

Logged
GMaq
Administrator
Hero Member
*****
Offline Offline

Posts: 2160


A/V 'Nixer


WWW
« Reply #5 on: March 09, 2010, 07:18:22 AM »

Hi,

That is very odd that your existing HDD partitions are not being detected by GParted, are they ext3 partitions? Even so the ntfs partitions for Windows should be detected. I am not familiar with Mandriva myself, although I hear it is quite good. I wonder if it has some sort of unique volume management setup or extra security features that Debian can't detect.

**EDIT**
I have just been made aware that there is a bug in GParted that comes with 20100201 Snapshot I will look into fixing this for the next snapshot to be released very soon.
« Last Edit: March 09, 2010, 01:09:52 PM by GMaq » Logged

AV Linux, Proudly created with Remastersys: http://www.bandshed.net/AVLinux.html
varpa
Hero Member
*****
Offline Offline

Posts: 333


« Reply #6 on: April 16, 2010, 01:11:54 PM »

Just to follow up on this thread.  I researched my partition problem and discovered that I did have an extended partition which overlapped with some primary partitions.  This apparently got created when I repartitioned the disk to install mandriva.   Mandriva's partition manger (harddrake2) created the overlap, which was bad, but on the other hand Mandriva/windows did not mind that there were overlapping partitions and ran fine.  However, gparted is more sensitive and refused to deal with a disk with overlapping partitions.

So, I bit the bullet and fixed my overlapping partitions by deleting the overlapping ones and then trying re-create them properly using the original cylinder boundries so as not to re-use the original partitions (I did this with fdisk)   This was not entirely successful as my Mandriva / partition somehow got corrupted, but at least my /home was ok (I did have a backup, too).   Then I used gparted to shrink my Mandriva /home to make room for AVLinux and then installed AVLinux.    I also had to re-install Mandriva since its / partition had died.

I actually had a bit of a problem getting tri-boot (windows, Mandriva, AVLinux) to work properly - AVLinux's boot loader would not seem to recognize Mandriva.    Well, I forget all the details, but eventually I got Mandriva boot loader to do it.

At first, I had Mandriva/AVLinux mount each other's partitions in RW mode (when each was booted), but I found that this was a bad idea because after you run one system, and boot the other, the other system says the volume has errors and re-runs fsck.  This is because RW mode writes some stuff to the disk, which upsets the other OS.  So now I mount in RO mode and do not have this problem.

So now I have a working AVLinux system on my laptop.  However, it does not seem to work all that well, as I'll report on the other forum.   
Logged
ttoine
Newbie
*
Offline Offline

Posts: 3


« Reply #7 on: July 21, 2011, 03:28:19 PM »

I just configured the key, following the Howto. I was happy to see the logging screen. And then realised that I didn't know at all what the hell are the default login and password. Can you add something about that in the Howto ???
Logged
corartum
Newbie
*
Offline Offline

Posts: 1


WWW
« Reply #8 on: January 13, 2012, 03:22:49 PM »

I have the same problem man. Any link that would help will be very much appreciated. Cool
Logged

canezila
Hero Member
*****
Offline Offline

Posts: 144


« Reply #9 on: February 22, 2012, 02:35:06 PM »

Just to solve the last two posters problem (and mine too until I found the answer on a different thread here):

** Login using Live User (or Live.. I cant remember.... but NOT the Default 1st option).  Then you will not be asked to login as a user.)

I never used at all the LiveDVD, since my laptop for live don't have any optical drive. So I created the persistent usb key directly from Ubuntu, with Unetbootin, with the latest ISO of avlinux. Not from the live DVD. And after, I just edited the file to add "persistant", as in the howto.

Yesterday evening, I realized that the login problem is only when I use the "Default" session at startup. If I use the "Live" Session, there is autologin.

So, after some time reading howto's about root password recovery, and some trials, I found a way to solve the problem : I get the passwd and shadow files in /etc/ from the "Live" session and copy them on /live-rw/etc/, editing shadow to reset the root password. And of course, I now have a new password for root.
Logged
canezila
Hero Member
*****
Offline Offline

Posts: 144


« Reply #10 on: February 22, 2012, 02:39:33 PM »

I am now running AV_Linux 5.03 from a class 6, 16GB card.  THIS IS SAVING MY BUTT!!!  I was having the worst time with Ubuntu through wubi.exe.  I have to use school computers and dont want to anger the IT department by wiping their XP.  lol 

This is the 1st time I have found an option to use a complete music and video based distro that runs from some sort of usb and is persistent and has no lag (yes, I know... I read what was written ... but my jack has no xruns... I have no issues here.. )

So THANK YOU THANK YOU THANK YOU!!!

 Grin
Logged
canezila
Hero Member
*****
Offline Offline

Posts: 144


« Reply #11 on: February 24, 2012, 02:27:56 PM »

I spoke too soon.  My attempts work great but they can not find the persistent storage.  So it is like using the live CD... which is great to save the day.. just have to reconfigure some personal configs everytime I load it.  But I can say the "live-rw" IS being used.  There ARE files added there when I install Ardour3.  So I know that it IS working.... just not saving on reboot or maybe not knowing its there when it looks for it?  Maybe I messed up a permission on this partition also.. I changed the partition to allow others to save on there also.. so I could use it for my Ardour folder as well.. and my vst and sf2 files. 

I tried to do a plan install onto my sdcard but couldnt get this dell schiool computer to boot it.  It boots USB drives but not that one.  Also tried to make a USB key via-Start Up Disk Tool but that didnt work either.

So I am back to using the SDcard as a live disk... if I could only get the persistent part to work.  I will keep trying to get it.  My last idea is to revert back to original permissions on the live-rw drive.  this whole issue could my own mistake!! lol  I will update either way.  If I can get it to work, my errors might save others time...

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!