[How-To] SquashFS with LZMA compression

SquashFS (.sfs) is a compressed read-only file system for Linux. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression. SquashFS is also free software (licensed under the GPL) for accessing SquashFS filesystems.
SquashFS is intended for general read-only file system use and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. The standard version of SquashFS uses gzip compression.
Here is my How-To on how to get LZMA compressed SquashFS in Archlinux.
Requirements
1) squashfs-tools with LZMA patches. This package provides tools (mksquashfs, unsquashfs) to create Squashfs filesystem. With standard version (from /extra repository) you can create only gzip-compressed  Squashfs filesystem. To get LZMA support you must install package:
squashfs-tools-lzma
This package doesn't conflict with package from /extra. It provides mksquashfs.lzma, unsquashfs.lzma. So if you want create LZMA compressed filesystem you must use:
mksquashfs.lzma source dest
Otherwise for GZIP compressed filesystem:
mksquashfs source dest
2) squashfs module with LZMA patches. Without it you cant't mount your LZMA compressed filesystems. Here is two ways on how to get it.
2.1 Patch kernel with SquashFS LZMA patches.
Before proceed i recommend to read Custom Kernel Compilation with ABS
You must apply on sources three patches:
051-squashfs_pcomp.patch
052-pcomp_lzma_support.patch
053-squashfs_lzma.patch
And set in kernel config:
CONFIG_SQUASHFS=m|y
CONFIG_SQUASHFS_SUPPORT_ZLIB=y
CONFIG_SQUASHFS_SUPPORT_LZMA=y
CONFIG_CRYPTO_UNLZMA=m|y
m|y means that you can build it as a module (m) or as a part of kernel (y).
Build kernel as usual and after that you can mount LZMA compressed filesystems.
2.2 Build standalone module without patching and rebuilding the whole kernel.
Warning. I am not Linux guru. And i think that this method is not optimal (but it works). Any suggestions are welcome from experienced users.
For ARCH kernel here is PKGBUILD on AUR:
kernel26-squashfs-lzma-modules
Create directory (called for example squashfs-module) somewhere on your hard disk. Cd to that directory;
Download here Linux kernel sources (i strongly recommend to use same sources as in PKGBUILD of your kernel);
Download LZMA patches listed in 2.1;
Now you need kernel config file. Get it from your kernel package;
Unpack linux kernel sources. Cd to that directory;
Copy kernel config file here and rename it to .config;
Now we can patch our kernel:
patch -Np1 -i /pathto_051-squashfs_pcomp.patch
patch -Np1 -i /pathto_052-pcomp_lzma_support.patch
patch -Np1 -i /pathto_053-squashfs_lzma.patch
Before building modules we need some preparations:
make prepare
make modules_prepare
The kernel is patched and all preparations are ready. We can build modules:
make modules SUBDIRS=crypto
make modules SUBDIRS=fs/squashfs
Modules are ready. Now we need to copy it to our kernel modules directory:
cp crypto/unlzma.ko /lib/modules/KERNELVERSION/misc
cp fs/squashfs/squashfs.ko /lib/modules/KERNELVERSION/misc/squashfs_lzma.ko
Now execute:
depmod KERNELVERSION
Modules are installed and ready for use.
Now you can load modules:
modprobe unlzma
modprobe squashfs_lzma
Remember to load both of them (unlzma and squashfs_lzma) and in that order.
I don't like this way. I think it is to possible to simplify this process. And this modules doesn't contain information about dependency. So you must manually load unlzma module.
How to use it
1) First we need to create SquashFS filesystem.
For GZIP:
mksquashfs source dest
For LZMA:
mksquashfs.lzma source dest
For example:
sudo mksquashfs.lzma /usr /usr.sqfs
2) Now we can mount it as usual.
sudo mount -t squashfs -o loop /usr.sqfs /mountpoint
Benchmark
du -hs /usr/
3.3G /usr/
GZIP (standard):
sudo mksquashfs /usr/ /usr.sqfs
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /usr.sqfs, block size 131072.
[=============================\] 137140/137140 100%
Exportable Squashfs 4.0 filesystem, data block size 131072
compressed data, compressed metadata, compressed fragments
duplicates are removed
Filesystem size 1449060.58 Kbytes (1415.10 Mbytes)
46.41% of uncompressed filesystem size (3122543.79 Kbytes)
Inode table size 1365724 bytes (1333.71 Kbytes)
29.28% of uncompressed inode table size (4664165 bytes)
Directory table size 1437349 bytes (1403.66 Kbytes)
42.30% of uncompressed directory table size (3397611 bytes)
Number of duplicate files found 21775
Number of inodes 141741
Number of files 127438
Number of fragments 7820
Number of symbolic links 3853
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 10450
Number of ids (unique uids + gids) 6
Number of uids 2
root (0)
policykit (102)
Number of gids 6
root (0)
locate (21)
mail (12)
tty (5)
policykit (102)
dbus (81)
real 7m28.167s
user 11m18.825s
sys 0m4.214s
du -h /usr.sqfs
1.4G /usr.sqfs
LZMA (patched):
sudo mksquashfs.lzma /usr/ /usr.lzma.sqfs
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /usr.lzma.sqfs, block size 131072.
[=============================|] 137140/137140 100%
Exportable Squashfs 4.0 filesystem, data block size 131072
compressed data, compressed metadata, compressed fragments
duplicates are removed
Filesystem size 1326846.64 Kbytes (1295.75 Mbytes)
42.49% of uncompressed filesystem size (3122543.79 Kbytes)
Inode table size 1067747 bytes (1042.72 Kbytes)
22.89% of uncompressed inode table size (4664165 bytes)
Directory table size 1360891 bytes (1329.00 Kbytes)
40.05% of uncompressed directory table size (3397611 bytes)
Number of duplicate files found 21775
Number of inodes 141741
Number of files 127438
Number of fragments 7820
Number of symbolic links 3853
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 10450
Number of ids (unique uids + gids) 6
Number of uids 2
root (0)
policykit (102)
Number of gids 6
root (0)
locate (21)
mail (12)
tty (5)
policykit (102)
dbus (81)
real 22m51.122s
user 28m39.617s
sys 9m46.870s
du -h /usr.lzma.sqfs
1.3G /usr.lzma.sqfs
Results
Size of /usr: 3.1 Gib (3.327.028.002) 131.201 files, 10.642 sub-folders
Size of usr.sqfs: 1.4 Gib (1.483.841.536)
Size of usr.lzma.sqfs: 1.3 GiB (1.358.692.352)
P.s. Sorry for my poor english. Any corrections are welcome.
P.p.s. Any suggestions, improvements are welcome.

I appreciate this howto, although performance seems bad. I also suggest you put it on the wiki instead of the forums because more people will be able to find it that way. Any idea why performance seems so bad? 1.4G vs 1.3G doesn't seem like a good trade-off, especially considering the time it takes to do the lzma based compression.

Similar Messages

  • How does lightroom 4 deal with lossless compressed raw files

    how does lightroom 4 deal with lossless compressed raw files

    Ok, sorry about the vague question.  My concern is centered around a new camera purchase ( Nikon D810 ) which produces huge files.  I shoot in RAW and never use lossless compression only uncompressed RAW because of my conservative nature .  But now it looks like I will be using Lossless compressed to help deal with the file size.  So the question was based on fears of data lost.  Thanks for the replies, and they confirm what I already suspected. So now I can feel confident using lossless compression.
    Thanks

  • How do i use parallel compression for 4 drum tracks in Logic pro 7.2.3 Please

    how do i use parallel compression for 4 drum tracks in Logic pro 7.2.3 Please. my version is 7.2.3 and my son did his drums on 4 tracks. 2 OH's 1 Kick and 1 Snare. Were confused because we cant figure out how to do parallel compression on the older logic version 7.2.3?

    I can't remember when the Aux tracks became the new buss tracks, so I'll spell this out using busses.
    The way I do it, is I assign all my drum tracks to a buss, say buss 1.
    Then, on buss 2, I assign it's INPUT to buss 1.
    So buss 1 (all the drums) are feeding into buss 2 simultaneously.
    Put a compressor on buss 2, turn the fader down all the way, then as the track is playing, bring buss 2's fader up slowly, until you hear the effect you're after.
    You could also do this using sends on the 4 drum tracks, set to feed the buss with the compressor on it.
    I hope I haven't forgotten anything particular to that version of Logic. See if this helps...

  • How to deal with dust on the rear camera

    So for some time now I have noticed some fuzzy dark areas on my rear facing camera, to the point where I can see dust on the lens but I can not seem to make it move. I have tried using compressed air to get it off but I think it is behind the lens?!? I don't know how that is even possible. However I don't know where to turn to get this fixed. I do not have apple care because a rep fed me the line that I was unavailable because I was over 20 min of talk time when I wanted to get it less than 2 weeks after getting the phone. Does anyone know what I could do? Thanks.
    -Alex
    iPhone 5
    iOS 7.1.2

    there is a huge long thread of messages about the camera dust issue:
    Is there dust inside camera lens of iPhone 5?
    personally myself would tell you if the iphone is out of warranty (you said you don't have applecare) and if the apple store won't fix it for you, then go to a repair shop that fixes iphones. look them up on yelp and read the reviews on the shops to find one you are comfortable with. yelp has been the best site that helped me in finding the best iphone repair shop in my area - look for lots of favorable reviews at the shops you may see listed near you to give you a clue as to which shops to narrow down your selection. another alternative is to do it yourself by opening up the iphone, simply lifting the camera sensor without disconnecting it, and directly blowing out the lens (which is actually part of the case) with that compressed air. can personally say this is relatively easy to do, but if you don't have the courage or incentive to do it, then don't do it yourself. if it turns out that the dust is actually in the camera sensor, then that part has to be replaced. get a repair shop to do that because that involves taking more of the iphone apart. the repair shop that has worked on three of my iphones would do a camera fix for $35. you'll have to call around in your search to find a shop and ask for quotes to do this stuff for you. the other alternative is you'll have the apple store probably suggesting that you buy a replacement iphone 5 if they still have them.

  • How do I stop mail compressing my photos?

    How do I stop mail compressing my photos? I have set 'Actual Size' in Mail and still the photos are compressed to thumbnail size.
    I'm using Mavericks 10.9.2 on a 2011 iMac.

    The best way is to use the Contextual menu application PhotoTool CM to losslessly rotate the photos before importing into iPhoto. Or use Xee, a free image editor with lossless rotation capability.
    If your camera has the auto rotate feature turn it off and then follow the suggestion above before importing. That will rid iPhoto of the modified version rotated to the correct orientation.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.
    Message was edited by: Old Toad

  • I can't save tif with jpeg compression method

    Hello, I've trouble to saving image in tif format with jpeg compression method.
    With the same image this option some times is unavailable, randomly, I don't know how.
    After some practice I leave that if I open an image previously saved in tif-jpeg the option turn on for the next save.
    I've got both CS5 and CS4, and the odd thing is this occour on all.
    Someone have triks?
    Thanks.
    Luca

    I know very well the difference betwin a background layer and transparent layer...
    I'm writing about a bug, or interference from something, when I want saving an image in tiff format with jpeg compression.
    I'm asking if someone had a similar trouble and know a solution and/or trik to solve this!!!
    I hope make myself clear.

  • Tiff image with JPEG compression

    How does photoshop handle RGB and YCbCr as photometric interpretations of tiff image with JPEG compression?
    Are they same?

    Got no idea but here is a website with a adobe pdf answer.
    http://www.ask.com/web?q=How+does+photoshop+handle+RGB+and+YCbCr+as+photometric+interpreta tions+of+tiff+image+with+JPEG+compression%3F&search=&qsrc=0&o=0&l=dir

  • How to work with 360 video?

    I am new to AE and am trying to work with a 360 equirectangular video I shot with a Freedom 360 and 6 go pros.
    Are there any tutorials on how to work with 360 spherical videos? Do I need to download additional plugins?
    Thank you,
    Phil

    Phil,
    Of course, the image needs to be big for this, but the plugin you would use is CC Sphere.
    Drop your movie into a composition and apply CC Sphere to the video.
    Then set the Render option in the effect to "Inside".
    Under Shading set Ambient to 100% and Diffuse to 0%.
    Then scale inside the effect until the image fills the screen.
    Then you'll be able to use the Rotate Y controls in CC Sphere to spin around inside your video!
    You can also add Optics Compensation and Reverse the Lens Distortion to straighten out your image.
    Let me know if you have any questions!
    Trent

  • I am having much trouble with the new reminders in IOS7 and how it interacts with Outlook Exchange. Many features lost in the new version.

    When I downloaded IOS7, I found that the reminders/task app and how it interacts with Outlook Exchange is much more difficult to use. Some of the issues that I am having are...
    1. Trying to edit my task on my phone is not possible, if the notes are lengthy. When you click on the text to edit data near the top, it will scroll to the bottom and not allow you to edit the text because you cant see it.
    2. Now all of my task are in one long list. I can not move from day to day like we could in previous version IOS6
    3. When I do edit a short task reminder and click done, it crashes and completly goes away. It does save the edit though
    4. You can only add task at the bottom of each days reminders. This is very inconvient and much more difficult than IOS6
    5. There is a major delay or latency when interacting inside of reminders in this version. Much more than IOS6. It is very unstable and quirky.
    I have never seen Apple take a step back with a product until now. I am a huge Apple fan and always will be, so I am hoping they make enhancements to fix these issue. It is a big time prodcutivity killer.
    Thanks for any and all help you can give.
    Troy Meachum

    Some power supplies or designed so that if there is a short or overload they shut them selfs off and some will not turn back on. Some have a relay that will click back on and work, some you have to  cycle the power switch. Those that won't come back on will have to be replaced. I'm not saying that yours is that type as I have no way of telling. But if you have a friend who will loan you a good power supply you might try it. As someone else said just turning off the power will not darn all the power from some motherboards. To test this turn off your power supply than turn on the computer with the start botton. Mine will flash the lights and fans will start to spin than die. So every time you turn off computer to work on it. After turning off PSU hit the start botton to drian any power left in it before working on it. Also do this after unplugging it just to make sure.

  • How to reduce size or compress PDF files?

    Hi guys,
    Does someone knows if there is a way  to reduce the size of the PDF file with good quality even on Pictures and Scanned documents? I know the option 'export', 'quartz filter' 'reduce size', but the compression is so extrem. Many files can't not been read, the quality is so bad. Is there a additional app, software or extension that let the user play with the compression on pdf files and let it be more personalized like the dopdf V7 available for windows? i am very dissapointed with this. Please help or suggestion. I will appreciate it. Thanks

    I have used the excellent PDF Toolkit app for a while, and its preformed well. Occassionaly it makes the document into a negative image...which Im noyt sure why...
    Mathishk, im trying your online version out, and am impressed and admire the fact that you have done this.
    Well done. 
    A TRICK i use often. Once all hires images are on the designed document - and its coming in at 15-20mb, just change the link to the images so they are 'missing' then make a pdf.
    i.e 'Hi Res images' to HRes images - old'
    The screen resolution of images is still great, but file comes in at fraction of the size.
    You 'trick' the document to use screen images only. So my 18mb file comes in as 5.2mb.
    Just remember to change the images folder name back, so files relink.
    Andy

  • How to deal with deadlock on wwv_flow_data table when http server times out

    There are some threads about a deadlock on the wwv_flow_data table. None of them contain a real explanation for this behaviour. In my case I will try to explain what I think is happening. Maybe it helps somebody who is hitting the same matter.
    In my case with APEX 3.2.1 I am navigating from one page to another. Doing this APEX will lock the table wwv_flow_data. As soon as the other page is shown the lock will be released. But now this other page contains a bad performing query (standaard report region). After 5 minutes the http server (modplsql) will time out and present the message "No response from the application server" on the screen. In the meanwhile the query is still running on the database server and the lock stays on the wwv_flow_data table.
    Normal user behaviour will be that the user will use the back button to return to the previous page and tries it again to navigate to the other page or
    the user will try to refresh the page with the bad performing query.
    And voila now you will have a deadlock on the wwv_flow_data table since a second session is trying to do the same thing while the first hasn't finished yet.
    How to deal with it?
    First of all. Have a good look at the bad performing query. Maybe you can improve it that it will succeed before the http server will timeout.
    In my case the 11gr1 optimizer couldn't handle a subquery factoring clause in the best way. After changing it back to a classical inline query the problem was solved.
    Secondly you could increase the timeout parameter of the http server. Although this not the best way.
    Maybe it would better if APEX in a next version would release the lock on the table wwv_flow_date earlier or do a rollback just before the moment that the http server is timing out.
    regards,
    Mathieu Meeuwissen

    Hello Shmoove,
    I saw your reply here and you probably understand the problems the HTTP 100 response may cause.
    I am trying to send image that was taken by getSnapshot. The problem is that the server respond with this HTTP 100 message.
    I suspect that the reason that my server doesn't recognize the file that I'm sending from J2me is that the "server to client" response to the 100 message comes after the second message of (see what the TCPIP viewer shows down here):
    POST /up01/up02.aspx HTTP/1.1
    Content-Type: multipart/form-data; boundary=xxxxyyyyzzz
    Connection: Keep-Alive
    Content-length: 6294
    User-Agent: UNTRUSTED/1.0
    Host: szekely.dnsalias.com:80
    Transfer-Encoding: chunked
    400: Client to Server (126 bytes)
    78
    --xxxxyyyyzzz
    Content-Disposition: form-data; name="pic"; filename="david.jpg"
    Content-Type: application/octet-stream
    400: Connected to Server
    400: Server to Client (112 bytes)
    HTTP/1.1 100 Continue
    Server: Microsoft-IIS/5.1
    Date: Wed, 23 Mar 2005 00:47:02 GMT
    X-Powered-By: ASP.NET
    Any help will be appreciated,
    David

  • How to sync with two computers not at the same time, I'm registerd with one computer

    How to sync with two computers (not at the same time), I'm registered with one computer and am trying to connect with second computer with same iPhone. To sync the first time with the second PC "Firefox Sync Option tells me Create New account or Connect, when I connect it gives me a Passcode and on iPhone it also gives me a Passcode, than how do I connect? Both the iPhone and PC gives me a Passcode and have now idea what to do with them.
    Where do I find my Sync Key ? so I can install manually if it works ?

    Use the Sync Key ''(Recovery Key)'' from the PC that you used to initially setup your Firefox Sync service, when setting up that 2nd PC with Sync. You need to use '''Add a device''' to setup the 2nd and subsequent devices on a Sync account. <br />
    https://support.mozilla.com/en-US/kb/add-a-device-to-firefox-sync

  • How to agree with terms of i tune  in order to update applications

    How to agree with terms of i tune  in order to update applications

    Are you agreeing to the terms, but then being asked to agree to them again and again, endlessly? Or is something a bit different going on?

  • How to deal with OpenCL grey out issue.

    First off, I'm not native english speaker.
    I have Nvidia GeForce 550 Ti video card, and its support OpenCL v1.1.
    I'm also face a "random" OpenCL grey out issue like other people here, but I found the "issue" and how to deal with.
    open a command windows (using WinKey + R, and type cmd <enter>)
    type "cd C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)" <enter>
    type "sniffer_gpu" <enter>  -->> to check your GPU has OpenCL in Photoshop?
    When GPU is in power-saving mode (core running in 51Mhz, using MSI Afterburner monitor), I running sniffer_gpu, got this report
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>sniffer_gpu
    Device: 0000000000328D68 has video RAM(MB): 1023
    Vendor string:    NVIDIA Corporation
    Renderer string:  GeForce GTX 550 Ti/PCIe/SSE2
    Version string:   3.0.0
    OpenGL version as determined by Extensionator...
    OpenGL Version 3.0
    Has NPOT support: TRUE
    Has Framebuffer Object Extension support: TRUE
    OpenGL ok
    Return code: 1
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>
    No OpenCL support
    Then, I switch GPU back to normal status (core running at 900Mhz)
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>sniffer_gpu
    Device: 00000000001F8D68 has video RAM(MB): 1023
    Vendor string:    NVIDIA Corporation
    Renderer string:  GeForce GTX 550 Ti/PCIe/SSE2
    Version string:   3.0.0
    OpenGL version as determined by Extensionator...
    OpenGL Version 3.0
    Has NPOT support: TRUE
    Has Framebuffer Object Extension support: TRUE
    OpenGL ok
    OpenCL ok, version=1.1 CUDA 4.2.1
    Return code: 3
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>
    OpenCL support !!
    Nowadays, most of new GPUs were support power-saving, but when sniffer_gpu running at GPU power-saving state, the OpenCL computing report maybe "time-out", cause the detector "guess" the GPU does not support OpenCL. This is why many people says "OpenCL" sometimes work, sometimes grey-out.
    I hope this bug can be fixed, or at least people can understand how to "enable OpenCL everytime when you launch photoshop".
    Bye.

    Do check the following link
    http://blogs.oracle.com/soabpm/2010/01/soa_suite_11g_weblogictransact.html

  • How to deal with "Error 1001. The specified service already exists" when install a service using installer package?

    Hi everybody,
    I wrote a "Class Library" project which is a service using Visual Stodio 2008 recently, then tried to use a Visual Studio 2008
    Setup Project to install it.
    Here is what I did for the "Class Library":
    1. Finish the program.cs, Service.cs
    2. Add Installer
    3. Change the serviceInstaller so that "StartType" to be Aotumatic
    4. Change the ServiceProcessInstaller2 so that "Account" to be LocalSystem
    5.
    6. Click in F5 (Start Debugging)
    Here is what I did for the Setup Project:
    1. Add the exe file built from the "Class Library" project to the Application Folder
    2. On the Custom Action Editor, add the exe file from 1 to Install and Commit
    3. Change the property of the project so that "RemovePreviousVersion" to be true
    4. Click on F6(Build Solution)
    Then I tried to run the msi file from the built of the Setup Project. Because I modified the two projects serveral times, I uninstalled the Class Library using "Control Panel->Add or Remove Programs" before I reinstall. Two things I notived:
    1. After unstall, the registry was not cleaned up about the installed program
    2. After several rounds install/uninstall, I got "Error 1001. The specified service already exists"
    My questions are:
    1. How to cleanup the registry when uninstall a program?
    2. How to deal with the "Error 1001. The specified service already exists"?
    3. Did I do anytbing wrong with the "Class Library" or the "Setup Project"?
    Thanks a lot!
    Helen

    Hi Simon, not a problem!
    I spent some more time on this and here are few more notes:
    it is called Major Upgrade, when you are installing new version of the product upon a previous one and
    MSI supports 2 strategies:
    Strategy 1. Install a new version and uninstall previous one. (Install a new version right upon previously installed version (file merging is performed based on dll version number) and the delete previously
    installed files)
    Strategy 2. Uninstall previous version and install a new one (Delete all previous files and install from scratch new files.)
    From the first look it seems that 1st strategy is weird and buggy. But, remember, MSI is great because it's transactional!!! That means that if once some of the phases (Installation, Uninstallation, Rollback, Comit) fails, your machine
    will be reverted to the previous state and it'll be still functional. 
    Let's consider both strategies:
    Consider you have installed product_v1.msi and you want to install product_v2.msi.
    Strategy 1
    1. MSI engine copies files from Product_v1 directory to TEMP directory
    2. MSI engine merges files based on the assembly version (between v1 and v2)
    3. Once merging is completed successfully it removes files in TEMP (RemoveExistingProducts  action triggers it) and you got product_v2 installed, otherwise if it fails MSI engine revert machine to V1 and copies previous files from TEMP.
    Strategy 2
    1. MSI engine tottaly removes all files from v1.
    2. MSI engine installs v2 files and if something goes wrong you cannot revert back, because RemoveExistingProducts  allready worked out and MSI doesn't have files to revert machine back
    I recommend to everybody to use Strategy 1 and leverage MSI transaction functionality. And you can set this strategies by defining sequence of RemoveExistingProducts action. See more info
    here.  So, I think it's not even a bug in VS as I said in the upper post it is default recommened behaviour.
    AND, you got "Error 1001. The specified service already exists"
    because if we follow Strategy 1 MSI engine tries to install Windows Service on top of the existing service and OF COURSE it fails MSI engine (StopServices, DeleteServices actions are executed before actual
    installation and  they look at ServiceControl table). In order to stop service first and delete them you have to fill ServiceContol table of the MSI (and then StopServices, DeleteServices actions will recognize what to they have to stop
    and delete), like this:
    *clip*clip*clip*
    ' see http://msdn.microsoft.com/en-us/library/windows/desktop/aa371634(v=vs.85).aspx for more info
    ' Update the Service Entry to stop and delete service while uninstalling
    query = "INSERT INTO ServiceControl (ServiceControl, Name, Event, Arguments, Wait, Component_) VALUES ('MAD_Service', 'Service name', '160', '', '1', '"
    + componentName + "')"
    Set view = database.OpenView(query)
    : CheckError
    view.Execute : CheckError
    ' Update the Service Entry to stop and delete service while installing
    query = "INSERT INTO ServiceControl (ServiceControl, Name, Event, Arguments, Wait, Component_) VALUES ('MAD2_Service', 'Service name', '10', '', '1', '"
    + componentName + "')"
    Set view = database.OpenView(query)
    : CheckError
    view.Execute : CheckError
    *clip*clip*clip*
    We can uninstall service first by following Strategy 2, but then we lose transactional support.
    So, Simon did I encourage you to change your code a bit?:)
    And, btw, if you don't want to change the strategy, please don't rely on SequenceID in MSI table, it can be change, you have to get the at the runtime.
    Hope it will help to everybody!
    See also more advanced explanation of how MSI works
    here.
    Truly yours, Marat

Maybe you are looking for

  • How to Connect my External WD Passport hard disk using wifi

    Dear Friends, i have got a new Apple Ipad 4 Gen, of 16GB but now i am facing a problem due to space requirements. my ipad is filling with lots of photoes and music.right now only 750mb is available among 16GB. i have an idea ,i need to connect my Ext

  • Reading Data from a Table With an Expert

    Hi all - I'm trying to write an Expert in OWB that would read data from a table and create a new table based on that information. I have the table creation part down, but how can I read data from a table with an Expert? From what I've read, Experts o

  • Plz help upgrade issue moving data from char type structure to non char typ

    Hi Experts plz help its very urgent Data :workout(5000) . FIELD-SYMBOLS : <FS_WORKOUT> TYPE ANY.   workout = '         u' . ASSIGN WORKOUT TO <FS_WORKOUT> CASTING TYPE C .                   BAPISDITM = <FS_WORKOUT>. i am getting dump after BAPISDITM

  • Camera Raw Update Not Showing Up

    I have Photoshop CC, Mac, latest version and I haven't used Photoshop in a little while, but updated to the latest version of Lightroom and realized I am a version behind.  It doesn't show up in the CC app, nor does it show up in the Update link with

  • IWeb '09 and GoDady

    Up until recently, I would use iWeb to create web pages or a web-site, then give it to someone else to upload on their GoDaddy account. My "uploader" contact has since sold his business and I have some of his GoDaddy accounts dumped into my lap. Ther