[Solved] Clone existing arch system onto dm-crypt encrypted volume

Hi all,
I've been playing around with full disk encryption using dm-crypt and luks, and have it working pretty well on a spare harddrive. I don't want to go through the process of re-customizing a full install again, so I was wondering if it's possible to clone my / partition from my current install to an encrypted disk?
My end goal is to have my /boot partition on a USB thumb drive and a giant encrypted volume for the rest of the / partition (including /home).
My current drive has a / partition and a separate /home partition.
I'm imagining something like this:
Set up the whole new drive as an encrypted volume, unlock it with cryptsetup and map it to /dev/mapper/root
dd if=/dev/myOldDisk/rootPartition of=/dev/mapper/root
delete the encrypted /boot (it came over from OldDisk but I don't want it on the new encrypted disk).
Copy files from old home to encrypted disk's /home folder.
Would that work? Or am I better off just copying files over from my old / folder rather than using dd?
I appreciate any input you've got!
-Lefty
Last edited by LeftyAce (2014-01-06 22:41:14)

LeftyAce wrote:Set up the whole new drive as an encrypted volume, unlock it with cryptsetup and map it to /dev/mapper/root
dd if=/dev/myOldDisk/rootPartition of=/dev/mapper/root
+1 to dodo3773's suggestion to use rsync, the above dd would create garbage anyway. You could dd an encrypted partition to another empty one (on the new drive), but creating and mapping a new encrypted volume first will result in a fresh encryption key. The garbage occurs since your command clones encrypted bytes incl. the old encryption header to a transparent (non-encrypted) mapper. A bit more info here.

Similar Messages

  • HT4848 How do I create a Recovery System on my start up volume/hard drive?

    So i discovered the article about using the Recovery Disk Assistant....but, I noticed it says that in order to create a Recovery on an external HD that it requires an existing Recovey System on my start up volume...I assume this means a Recovery partition on my startup hard drive? If someone could explain to me how to create one or if I already have one, I would great appreciate the help...
    If its relevant I am using a
    MacBook Pro Mid 2010
    Core 2 Duo 2.4 Ghz
    4GB RAM
    Intel 120 GB SSD 320 Series

    Hopefully you already have it. 
    The only time a recovery partition can be created is during installation from mac app store, it's automatic and cannot be done manually. 

  • My mac mini does not boot, after backing the enire system onto an external drive with Carbon Copy Clone

    My Mac Mini does not boot, after backing the enire system onto an external drive with Carbon Copy Clone. I had switched the start-up disk back to the original of course. Now all I see is the Apple logo. What should I do? Thanks in advance.

    Try disconnecting any external devices, especially hard drives
    and try rebooting.
    If that doesn't help, then :
    If you are running Lion, boot to the Recovery HD and run a
    Repair Disk on the OSX partition.
    If Snow Leopard, boot to the installl DVD and run Repair Disk.
    Also, you may want to bookmark this:
    http://reviews.cnet.com/8301-13727_7-57345273-263/troubleshooting-the-boot-proce ss-for-intel-macs/?tag=txt;title
    for future reference.  It is a pretty good explanation of the
    Mac boot process and how to identify where problems may be.

  • [SOLVED]possible to make live image of a current running arch system?

    Hi Friends!!!. Is it possible to make live iso image of a current running arch system? are there any tools available for that?(I want to do this cause When i install a new arch system, I want to remain my own customizations intact)
    Last edited by Pranavg1890 (2012-10-14 07:29:58)

    OK, so after reading the posts, I think that this is not possible.but i think this sould be feature which should be researched upon cause everytime I install arch on a new machine(arch reinstalls on same machine are very rare cause it's a rolling release and has excellent recovery tools) I have to spend a 5-6 hours of time configuring the system.so, i think it should be a feauture that should be worked upon.for eg. like you could chroot into the iso created and then replace the deafult configs by the one on your system or a system scanner which scans the changes on the system with respect  to default arch installation and make the necessary changes to the live image.Thanks friends for your replies. I mark this thread as solved.

  • [SOLVED] Remote Access to a home Arch system behind the router.

    Hello,
    I am trying to remotely access my home Arch system from school. I did try doing something and this is what I did:
    1. Used DynDns and NO-IP to setup a free domain, I thought NO-IP script was easy to run so I tested this on NO-IP.
    2. I then installed Openssh.
    3. Then I have setup the Port forwarding on the router to point to my ssh port (change from 22).
    4. I tried to ping, the domain name from NO-IP with no response.
    What I want to ask is... is there any better way of doing this?
    I dont need a desktop access, simple ssh should do for now.
    Thank You
    Gopi
    Last edited by gopichand (2011-11-01 00:50:13)

    OK, I have solved this by this process. Will work only if the router supports the DynDNS. I am assuming that you have created a DynDNS account, its free for 2 domains. I also had to make my computer use STATIC IP from my router, just specify any IP address outside the DHCP range.
    1. On the router, add the details about the DynDNS account. On my Belkin Router, I had to go to Firewall -> DDNS -> DynDNS and give the details and also enable it.
    2. By doing the above step, we don't have to install the client for DynDNS.
    3. On the router again, setup the port forwarding, again (on my Belkin Router) go to Firewall -> Virtual Servers -> Add the IP and the port numbers, I had to use the same number for both the incoming and the private port, though for other routers the number can differ?
    4. On the computer, I installed the openssh and then changed the login port to the one specified in the router for forwarding.
    5. Make the router and ssh logins as safe as possible. I understand that opening the router is not safe so I have to warn you.
    I can now login using my DynDNS domain name from anywhere woohoo!
    Last edited by gopichand (2011-11-01 01:07:23)

  • [SOLVED] Advice for Arch install with rEFInd dual boot Lenovo laptop?

    I am trying to plan an Arch install on a new laptop for dual boot with Windows 8.1, but I know there is a potential to cause huge problems so I have been trying to read and learn about the hard disk partition structure and how I might install the rEFInd boot files so that I am still able to boot Windows once Arch is installed. (Unfortunately for some tasks such as updating the maps on my satnav box Windows is essential). However I am really quite unsure if I am doing the right thing in the way I am thinking about the Arch install so I would appreciate any help from experts on the forum.
    The laptop is a Lenovo IdeaPad Y510p which came with Windows 8 pre-installed, with the option to upgrade to Windows 8.1.  The upgrade was completed without issue and I then looked into the question of hard drive partitions and boot.  I had read posts on the Ubuntu forums about users who had installed Ubuntu on this same laptop and ended up being unable to boot Windows afterwards so I wanted to tread very carefully before executing anything which might cause really major damage. I had also read on the Lenovo forums replies about people who had replaced the hard drive and installed linux only to find that they could  not boot to the recovery partitions, with replies from Lenovo moderators saying that if the partition structure had been changed then the laptop would have to be sent back to Lenovo for a factory repair.
    On this laptop to get into the bios or boot options you do not just press the power button and hit an F key, but instead there is a special small "OneKey Recovery" button next to the power jack, which opens up with options for BIOS setup and boot options as well as normal boot or recovery. This OneKey Recovery button is therefore needed to boot a usbkey - the power button only allows it to boot to windows presumably until/unless a different bootloader and NVRAM entry is amended.
    I have done all the initial ( safe!)changes necessary to move to the point at which I can execute the Arch install. From within Windows (switched off fastboot, and shrunk the "C:" drive to make space for linux partitions).  I have also switched off Secure Boot from the BIOS, and made sure that Windows still boots up fine.
    The current arch install iso (February 2014) boots under uefi just fine - and of course once booted I have access to the gdisk programme.  That certainly showed the pre-existing partitions on the drive (8 partitions with partition number 2 being the EFI partition, and three recovery partitions!) with a GPT partition table, and it should therefore be possible to make the necessary new linux partitions in the now unallocated space on the disk that was freed up with the internal disk management facility within Windows 8.1.  So at that point I created three partitions for a root partition (type 8300), a swap partition (type 8200) and another type 8300 partition which will become /opt in the installed Arch system.
    In order to try and not make any changes to the partition structure I let the three new linux partitions be number 9, 10 and 11.
    I am told that for a GPT disk it is a definite no-no to try to create more than one EFI partition. So I will need to use the existing EFI partition to place the rEFInd files and the kernel once I install Arch.
    In this (Y510p) laptop the EFI partition contains the following structure:
    BOOT/ - containing only boot.sdi
    BOOTSECT.BAK
    EFI/ which contains two directories Boot/ and Microsoft/
    so EFI/Boot/ contains only Boot64.efi which is likely a fallback copy of the Windows 8.1 bootloader
    and EFI/Microsoft/ contains a Boot/ directory - so
    EFI/Microsoft/Boot/ contains loads of language specific directories like en-GB/
    plus bootmgfw.efi (which I believe is the Windows main efi loader file)
    bootmgr.efi
    memtest.efi
    The scheme that I am planning to use which I have previously used in pure Arch uefi machines, is that /boot is a directory in the root partition, /. That way /boot is an ext4 directory and will contain the kernel and initramfs plus the rEFInd linux config file.
    Then I can mount the EFI (vfat) partition as /boot/efi and so I can then make a /boot partition under /.  Then the EFI /BOOT/ directory would be seen in Linux as /boot/efi/BOOT/ and the Windows efi stuff would be in /boot/efi/EFI/Boot/Microsoft/Boot/ in which case I would presume that I have to make a new directory in /boot/efi/EFI/refind/ and put the refind stuff including the filesystem drivers there, and let the kernel go into the (ext4) /boot/ directory which would be preferred!  However I am not 100% confident that this is what will work and I need to read more before trying to do the install. The thing that concerns me is how the system will handle the uefi boot process, and whether it would auto-detect the Windows efi file as well as the Arch refind efi file once the system has started up?
    ... and then there is the issue of the NVRAM entries and I am no longer confident that if I use the usual tools to create an entry (efiboomgr or bcfg), that I will get a successful dual boot system!
    There is still a chance that I would irrevocably damage being able to boot to the Windows and Recovery partition boot options by messing up the EFI and/or the NVRAM so I have to tread very very carefully with this.
    If anyone has gone through this kind of dual boot install with a Windows 8 or 8.1 machine using rEFInd for the bootloader, and can offer advice or help here I would very much appreciate it.  I have another pure Arch system which uses rEFInd that works extremely well, but it seems that dual boot with uefi is a rather more complex animal than a pure linux system!
    Last edited by mcloaked (2014-02-22 10:06:03)

    vipin wrote:I have recently bought the y510p , im planning to install Arch , this is my 4th laptop , i had installed Arch in all the other 3 with no problems, but im a bit worried with the installation as this is the first laptop which has EFI , im a linux user for the past 6 years , i started with fedora , now i like Arch , mike documentation is excellent, i just had one question when i had grub , it automatically finds the new kernel when i update (grub.conf/menu.lst gets updated), does rEFInd also do that.
    When there is an update to the rEFInd package you need to copy the files across to your ESP from the files contained in /usr/share/refind/  usually you need to copy the refind_x64.efi binary as well as the icons, fonts, and drivers directories.  Since there is flexibility in how you configure the kernel and initrd files in terms of where they are located whether you need to do anything else when a new kernel update arrives depends on how you set your system up.  If you have the /boot directory as your ESP partition which will then have the kernel and initrd files updated by default then there no need to do anything else when there is a kernel update. If the ESP is then at /boot/EFI and within that is your refind/ directory then that is where the replacement files go if refind-efi gets a pacman update. So it is actually fairly straight forward. If you configure rEFInd to look for kernels in some other directory than /boot/ then you may need to copy the files there after a kernel update but there is more information in the arch wiki about this.
    During a refind-efi package update there are helpful files in the pacman output (and log) reminding you of what you need to do.  eg for the latest refind-efi update you get:
    [2014-06-18 18:48] [PACMAN] upgraded radvd (1.12-1 -> 1.13-1)
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] rEFInd UEFI application has been installed at /usr/share/refind/refind_*.efi
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] Other UEFI applications have been installed at /usr/share/refind/tools_*/
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] UEFI drivers have been installed at /usr/share/refind/drivers_*/
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] Copy the efi application (according to your UEFI ARCH)
    [2014-06-18 18:48] [ALPM-SCRIPTLET] and /usr/share/refind/refind.conf-sample to a sub-directory of <EFISYS>/EFI/
    [2014-06-18 18:48] [ALPM-SCRIPTLET] as refind.conf and add an entry to firmware boot menu using efibootmgr
    [2014-06-18 18:48] [ALPM-SCRIPTLET] or mactel-boot (for Macs)
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] rEFInd Icons have been installed at /usr/share/refind/icons/
    [2014-06-18 18:48] [ALPM-SCRIPTLET] rEFInd Fonts have been installed at /usr/share/refind/fonts/
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] HTML Documentation is available at /usr/share/refind/docs/html/
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [ALPM-SCRIPTLET] More info: [url]https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd[/url]
    [2014-06-18 18:48] [ALPM-SCRIPTLET]
    [2014-06-18 18:48] [PACMAN] upgraded refind-efi (0.8.1-1 -> 0.8.2-1)
    I hope that helps.
    By the way you can also boot uefi using grub and in fact you can get rEFInd to chainload grub as a backup bootloader as an added safety factor and have both rEFInd as well as grub installed simultaneously. How that can be done is explained in the thread at https://bbs.archlinux.org/viewtopic.php?id=181906
    Last edited by mcloaked (2014-06-25 17:41:12)

  • Error while Installing the Java Add-In for an Existing ABAP System

    Hi all,
    I need help, i am Installing the Java Add-In for an Existing ABAP System
    SAPInst stops on the first installation step: "Central Services Instance (SCS) Java Add-In", the step is "Install common system files" on the following sub-steps:
    These are the last few lines on the sapinst.log.
    INFO 2009-05-21 12:35:12
    Execute step createAccounts of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_Users_Create_Do|ind|ind|ind|ind|3|0.
    INFO 2009-05-21 12:35:18
    Execute step setUserEnvironment of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_Users_Create_Do|ind|ind|ind|ind|3|0.
    INFO 2009-05-21 12:35:19
    Execute step InstallJDBCDriver of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_JDBCDriver_DB4|ind|ind|ind|ind|4|0.
    INFO 2009-05-21 12:35:19
    Creating directory V:\sapmnt\BIQ\jdbc.
    INFO 2009-05-21 12:35:19
    Creating directory V:\sapmnt\BIQ\jdbc\tbx.
    INFO 2009-05-21 12:35:21
    Copied file 'V:/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar' to 'V:/sapmnt/BIQ/jdbc/tbx/jt400.jar'.
    INFO 2009-05-21 12:35:22
    Execute step updateNtPatchDlls of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_System|ind|ind|ind|ind|5|0.
    INFO 2009-05-21 12:35:23
    Execute step sCreateSystemOS4 of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_System|ind|ind|ind|ind|5|0.
    ERROR 2009-05-21 12:35:42
    MOS-02001  Call of command "CRTR3SYS SID(BIQ) GLOBALHOST(*LOCAL)" failed. Exception is "CPF0006".
    ERROR 2009-05-21 12:35:42
    MOS-02001  Call of command "CRTR3SYS SID(BIQ) GLOBALHOST(*LOCAL)" failed. Exception is "CPF0006".
    ERROR 2009-05-21 12:35:42
    FCO-00011  The step sCreateSystemOS4 with step key |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_System|ind|ind|ind|ind|5|0|sCreateSystemOS4 was executed with status ERROR .
    Thanks in advance for any help.
    Kiran Chebrolu

    Hi,
    Hope this note would solve your issue, please read carefully and validate with your issue
    Note 1032019 - Java Add-In: Error when you create the SCS instance
    below notes give your suffice information.
    Note 883948 - NW 7.00(2004s): Inst.Add.Java Usage Types/Software Units
    Note 1268493 - NW 7.01/BS 7: Inst.Add.Java Usage Types/Software Units
    Note 1025789 - RUNR3CMD generates CPF0006
    regards
    nag

  • Installing Java Add-In for an existing ABAP System -Error SQL compatibility

    Hello gurus,
    We have a system and it has only the ABAP instance! So my goal is install the JAVA iinstance. In this momment I´m reading the section "4.4.2 Installing the Java Add-In for an Existing ABAP System (Optional)" in installation guide "SAP ERP 6.0 SR3" (ABAP+JAVA). So, I want to install the JAVA instance which is the Java Add-In for an existing ABAP system!
    So what I did was followed that instructions on that section in guide!
    As you certainly know this process has three sequential phases:
    1) Central Services Instance (SCS) Java Add-In
    2) Database Instance Java Add-In
    3) Central Instance Java Add-In
    The first phase - Central Services Instance (SCS) Java Add-In - it already finished with success, but I´m faccing with a weird error in second phase  Database Instance Java Add-In when I entered all required input parameters, SAPinst shows an error that says:
    The database PRD has the wrong compatibility level. The database used for the installation of an SAP system must have compatibility level: 80 for MS SQL Server 2000 90 for MS SQL Server 2005 SOLUTION: See the MS SQL Server documentation on how to set the compatibility level for a database.
    I don´t know what´s happen, in fact my database is an SQL Server 2008 (100), but I already change it at management studio, the compatibility level to MS SQL Server 2005, but still the error remains!!!     I also tried to ran again the sapinst process, I restarted it but it still show me this error!!
    Can you tell me why and how can I solve this problem?
    Best regards,
    João Dimas - Portugal

    Hello Sunny,
    I still have this error... I don´t know what do to more for this situation!
    I found one not which report this error of compatibility - Note 1152240 - Setting Up Microsoft SQL Server 2008 (R2) - in chapter "VII TROUBLESHOOTING" which said to follow the instructions in chapter III - "Installing SAP systems based on SAP NetWeaver 7.0 SR3".
    When I read this last chapter (III) it tell us to do:
    If you want to install an SAP system based on SAP NetWeaver 7.0 SR3 on SQL Server 2008, you cannot use the Installation Master and Kernel DVD that you received from SAP or downloaded from SAP Service Marketplace. Instead, you have to do the following:
    Patch your runtime libraries by applying the procedure that is described in note 684106 for your release and machine architecture.
    Use a modified Installation Master DVD
    For more information, see section "VI PROCEDURES" -> "Creating a modified Installation Master DVD".
    Use a modified Kernel DVD
    For more information, see section "VI PROCEDURES" -> "Creating a modified Kernel DVD".
    I did everything that is said in the note (except the "Creating a modified Kernel DVD") because I can not access to the note 1480785 (it say: "The requested SAP Note is either in reworking or is released internally only")
    Can you help me... can you guide me... please!?
    Best regards,
    João Dimas - Portugal

  • Installing the Java Add-In for an existing abap system

    Hi, Currently we are Installing the Java Add-In for an existing abap system.
    Following the steps (Installation guide):
    1) We sucessfully installed the Central Services Instance (SCS)
    2) We sucessfully Installed the Database Instamce Java Add-In
    Our problem comes in the third step
    3) Central Instance Java Add-In
    When the system prompts me the SAP System Identification (Select the central instance of your local host).
    I have a combo with two values: DVEBMGS00 of SAP System DEV and DVEBMGS00 of SAP System DEV
    (The same value)
    I chose anyone, and click next.
    The system send me an Input error and says "Caught EKdException in Module call: single select return more than on row"
    Any help is appreciated, and I will reward points if helpful.
    Regards

    I followed an advice made for a sap consultant, and delete some profile files.
    I had the following files
    DEFAULT.1.PFL
    DEFAULT.2.PFL
    DEFAULT.BAK
    DEFAULT.PFL
    DEV_DVEMGS00_bsomtymx005
    DEV_DVEMGS00_bsomtymx005.BAK
    DEV_SCS01_bsomtymx005
    START_DVEBMGS00_BSOMTYMX0
    START_DVEBMGS00_bsomtymx005
    START_SCS01_bsomtymx005
    after to delete the files, I have the following files
    DEFAULT.BAK
    DEFAULT.PFL
    DEV_DVEMGS00_bsomtymx005
    DEV_SCS01_bsomtymx005
    START_DVEBMGS00_bsomtymx005
    START_SCS01_bsomtymx005
    Then, I restarted the installation, and the sapinst allow me to continue with the installation.
    I really do not know if the installation will be sucessful, but this issue is solved.
    Thanks shanji, I was working in another tasks, but with your help, I will try to resolve again this problem, and found the solution.

  • New 64bit installation based on existing x86 system

    Hello there!
    I'm using a x86 Arch, and my hard disk is partitioned as follow:
    sda1 root
    sda7 home
    sda6 oth
    Where "oth" is a partition empy.
    I would like to "clone" my actual system to a new 64bit one.
    So, I can boot arch-dual-dvd in 64bit mode, install the new arch in sda6 then use it as new root.
    I am writing this to ask you whether is possible to "clone" my system as much as possible: installing the same packages, keeping the configuration files ( /etc/ ? ), don't touch the home and re-use in the new system..
    Any hint will be REALLY appreciated!
    M

    There's no any easier way that what you have already described however I tend to daisy chain my x86_64 and i686 so that I can chroot the i686 under x86_64 and then I have access to 32-bit chroot, (not that I use it all that much).   But then you can also make a slight change to your i686 kernel and make it available (with some other installed services), a PXE bootable image for some other device you have laying around.

  • Larch-4 testing, can also 'livify' existing Arch installation

    I've uploaded a testing repository for larch-4 to:
    ftp://archie.dotsrc.org/projects/archie/larch/testing
    It has some added features which need testing - especially with USB, which is difficult for me to test because my computers are rather old and don't support USB boot.
    It should now be possible to adjust the session-saving behaviour without modifying the larch scripts - additional scripts (hooks / event-handlers, call them what you will ...) can be placed in a 'scripts' folder in the root directory of the boot device (using the profile mechanism) to adjust loading and saving of overlay files. Initial description (sorry, it's still rather sketchy) in the session-saving doc page.
    The home directory is now a separate sqf (not overlayed).
    Added options to mklarch to build a CD/USB-stick from an existing Arch installation. This can be done, for example, from a live CD (using the -x option) or even from the system itself while it is running (option -X). This could be rather dangerous - don't do it on your main installation. I've tried it out - without obvious damage - on a test installation, and it looked quite promising, but be careful.
    Added option -r to mklarch to ensure regeneration of base and system sqfs when 'reusing' an installation (with options -b, -x, -X).
    Changed the place where the live CD is built (default /home/larchroot) and the structure within this folder. The installation is now made directly to this location and the building is done in subfolder .larch, where the final iso also lands.
    To use it, just copy the larch-setup.sh script to an empty folder and run it (as before). Then you have the new mklarch set up and ready to go.
    Feedback welcome.

    spookykid wrote:
    Hi gradgrind, this tool is really what I'm looking for. I have 3 partitions: /dev/sda1 -> swap; /dev/sda2 -> reiserfs (partition where my system is installed); /dev/sda3 -> reiserfs (partition where I'm running mklarch script). I want to try larch but I have a few questions.
    1) To create a LiveCD from my current arch setup I only need to  run
    ./mklarch -X
    If you're running the system you want to save, yes. But from your description it sounds like you're doing something else. Do I understand correctly that you have some other system unrelated to sda2 on sda3 and you want to run mklarch from sda3? And what you want to livify is sda2? Then you need to do something like:
    # mount -o dev,exec /dev/sda2 /mnt/sda2
    # ./mklarch -x /mnt/sda2
    Note the small 'x'.
    spookykid wrote:2) Is it possible to add gensplash to larch?
    Sorry, I have no idea about gensplash. If it's supported by Arch then it should work with larch too, but it's not something in which I have any interest.
    spookykid wrote:3) For what I've read about larch I can have a system installed with 4 GB and that will fit on a 700 MB CD?
    I hope I didn't write that. You might need that much free space to build a 700MB CD, but a more accurate estimate of what fits would be about 2GB. If you want more you'll need correspondingly more free space and a DVD or a large USB-stick.
    spookykid wrote:4) Larch will only go for my /dev/sda2 partition (where i have my system) or will it add all available partitions to the live image?
    It just packs up what it finds at the mount point, so if you've got other stuff mounted within the system (I guess in your case you probably haven't) don't be surprised if it tries to pack that up too. I think (I hope!) it ignores stuff mounted within /mnt and /media, but I'd have to look at the code again to be sure. For people who have /home or /var or whatever on separate partitions it is necessary to mount these before running mklarch.
    If you use 'mklarch -X' (big 'X') to build a live CD from the currently running system, all the mounts should be ok anyway, but I think that in general building from a separate system, as you seem to want to do might be slightly safer.
    In any case, please back up anything important before running mklarch - just in case! It runs as root and could do all sorts of nasty things. I don't think it will, but don't blame me if it feeds your grandmother to the ravenous bugblatter beast of Traal

  • ArchTaz Live: boot and run an Arch system entirely in RAM

    ArchTaz Live Boot: A method to boot and run an Arch system entirely in RAM using tmpfs.
    As the name suggests it was inspired by (copied entirely from) SliTaz http://www.slitaz.org/ and boots in exacly the same way.
    It needs a custom init script in the root directory and for some reason that I can't work out a hook for sysinit_premount in rc.sysinit to remount / rw.
    The /usr/bin/archfs script is just a chunk of Slitaz's Tazusb utility with some minor changes (and I haven't properly tested the lzma or no compression).
    The /init script is modified from the usual initramfs /usr/lib/initcpio/init with hints from the SliTaz /init script (and some personal additions for my system).
    Copy init to the root directory, run archfs (eg. # archfs writefs gzip) and move the resulting archfs.gz to your boot partition/directory and boot with archfs.gz as your initrd.
    I run a fairly light system (Openbox, Firefox, Gnome-Mplayer, SpaceFM, no dev packages) and gzip compression gives me an archfs.gz just over 230MB that boots in just over 30 seconds using 138MB RAM on startup, and most applications start instantly (2GHz Core2Duo, 4G RAM). Lzma compression generally gives a smaller archfs.gz but takes longer to boot. I have a persistent home partition, I install packages as I need them and then they're gone on next reboot if I don't do a new archfs.gz to keep them. I delete man pages, unneeded locales, etc. Obviously if you're running a hefty install on a limited box you may run into problems.
    Any tips, cleanups, corrections welcome. It's been a mostly copy and paste and mash stuff together process so it isn't neat. And I think I may need some serious help when systemd becomes default.
    /usr/bin/archfs:
    #!/bin/sh
    # Archfs - entirely copied from part of the Tazusb utility supplied with
    # SLiTaz GNU Linux - with some cosmetic changes.
    ### Tazusb - SliTaz LiveUSB
    ### Tazusb is an utility to generate, configure and manipulate SliTaz LiveUSB
    ### bootable media and/or USB /home partition, such as flash keys, SD card or
    ### USB harddisk.
    ### Authors : Christophe Lincoln (Pankso) <[email protected]>
    ### Andrew Miller (Spode) <[email protected]>
    COMMAND=$1
    case $COMMAND in
    writefs)
    # Writefs to rootfs.gz
    if [ -z $2 ]; then
    COMPRESSION=none
    else
    COMPRESSION=$2
    fi
    # Start info
    echo ""
    echo -e "\033[1mWrite filesystem\033[0m
    ===============================================================================
    The command writefs will write all the current filesystem into a suitable cpio
    archive (rootfs.gz) usable on a bootable LiveUSB media.
    Archive compression: $COMPRESSION"
    echo ""
    # Create list of files
    find /bin /etc /init /sbin /var /lib /lib64 /root /usr >/tmp/list
    for dir in /boot /dev /home /proc /sys /tmp /mnt /media /run
    do
    echo $dir >>/tmp/list
    done
    # Generate initramfs with specified compression
    if [ "$COMPRESSION" = "lzma" ]; then
    echo -n "Creating archfs.gz with lzma compression... "
    cat /tmp/list | cpio -o -H newc | lzma > /archfs.gz
    elif [ "$COMPRESSION" = "gzip" ]; then
    echo -n "Creating archfs.gz with gzip compression... "
    cat /tmp/list | cpio -o -H newc | gzip -9 > /archfs.gz
    else
    echo -n "Creating archfs.gz without compression... "
    cat /tmp/list | cpio -o -H newc > /archfs.gz
    fi
    # Get initramfs size
    size=`du -sh /archfs.gz | cut -f 1`
    echo "==============================================================================="
    echo "Root filesystem size: $size"
    echo ""
    echo -en "----\nENTER to continue..."; read i
    esac
    exit 0
    /init:
    #!/bin/bash
    PATH=/bin:/usr/bin:/usr/sbin:/sbin
    udevd_running=0
    if [ -x /usr/bin/systemd-timestamp ]; then
    RD_TIMESTAMP=$(systemd-timestamp)
    fi
    . /usr/lib/initcpio/init_functions
    mount -t proc proc /proc -o nosuid,noexec,nodev
    mount -t sysfs sys /sys -o nosuid,noexec,nodev
    mount -t devtmpfs dev /dev -o mode=0755,nosuid
    mount -t tmpfs run /run -o nosuid,nodev,mode=0755
    mkdir -m755 /run/initramfs
    # parse the kernel command line
    parse_cmdline
    for d in ${disablehooks//,/ }; do
    [ -e "/hooks/$d" ] && chmod 644 "/hooks/$d"
    done
    #. /config
    run_hookfunctions 'run_earlyhook' 'early hook' $EARLYHOOKS
    [ -n "${earlymodules//[[:space:]]}" ] && modprobe -qab ${earlymodules//,/ }
    [ -n "${MODULES//[[:space:]]}" ] && modprobe -qab $MODULES
    # If rootdelay is empty or not a non-negative integer, set it to 10
    if [ -z "${rootdelay}" ] || ! [ "${rootdelay}" -ge 0 ]; then
    rootdelay=10
    fi
    run_hookfunctions 'run_hook' 'hook' $HOOKS
    # honor the old behavior of break=y as a synonym for break=premount
    if [ "${break}" = "y" ] || [ "${break}" = "premount" ]; then
    echo ":: Pre-mount break requested, type 'exit' to resume operation"
    launch_interactive_shell
    fi
    rootdev=$(resolve_device "$root") && root=$rootdev
    unset rootdev
    #fsck_root
    # Make /new_root
    mkdir /new_root
    # Mount root at /new_root
    #${mount_handler:-default_mount_handler} /new_root
    echo -e "Switching / to tmpfs..."
    mount -t tmpfs tmpfs /new_root
    run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS
    run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS
    # Stop udevd if is running
    if [ "${udevd_running}" -eq 1 ]; then
    udevadm control --exit
    udevadm info --cleanup-db
    fi
    # Copy root
    echo -e "Copying root..."
    for i in $(ls -a /); do
    case "$i" in
    .|..) ;;
    mnt) mkdir /new_root/mnt;;
    proc) mkdir /new_root/proc;;
    sys) mkdir /new_root/sys;;
    dev) mkdir /new_root/dev;;
    run) mkdir /new_root/run;;
    new_root) ;;
    *) cp -a /$i /new_root
    esac
    done
    # Create mountpoints
    mkdir /new_root/mnt/sda1
    mkdir /new_root/mnt/sda2
    mkdir /new_root/mnt/sda3
    mkdir /new_root/mnt/sda4
    init=${init:-/sbin/init}
    echo -e "Switching root..."
    exec env -i \
    "TERM=$TERM" \
    "RD_TIMESTAMP=$RD_TIMESTAMP" \
    /sbin/switch_root /new_root $init "$@"
    ## Mount root at /new_root
    #${mount_handler:-default_mount_handler} /new_root
    #run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS
    #run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS
    init=${init:-/sbin/init}
    if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then
    # Nothing got mounted on /new_root. This is the end, we don't know what to do anymore
    # We fall back into a shell, but the shell has now PID 1
    # This way, manual recovery is still possible.
    err "Failed to mount the real root device."
    echo "Bailing out, you are on your own. Good luck."
    echo
    launch_interactive_shell --exec
    elif [ ! -x "/new_root${init}" ]; then
    # Successfully mounted /new_root, but ${init} is missing
    # The same logic as above applies
    err "Root device mounted successfully, but ${init} does not exist."
    echo "Bailing out, you are on your own. Good luck."
    echo
    launch_interactive_shell --exec
    fi
    if [ "${break}" = "postmount" ]; then
    echo ":: Post-mount break requested, type 'exit' to resume operation"
    launch_interactive_shell
    fi
    exec env -i \
    "TERM=$TERM" \
    "RD_TIMESTAMP=$RD_TIMESTAMP" \
    /sbin/switch_root /new_root $init "$@"
    # vim: set ft=sh ts=4 sw=4 et:
    /etc/rc.d/functions.d/root_rw:
    root_rw() {
    mount -o remount,rw /
    add_hook sysinit_premount root_rw
    archfs:
    http://pastebin.com/RNTDWhFc
    init:
    http://pastebin.com/n4vcqG62
    root_rw:
    http://pastebin.com/i1LV61SV
    Last edited by 0ddba11 (2012-12-30 10:12:35)

    Oh yes any man directory was symlinked to /tmp long ago, so they don't even get installed.
    Right, new boot process:
    Using hooks in normal initramfs-linux.img to unpack archfs.gz into tmpfs and boot it.
    Create an initcpio preset file /etc/mkinitcpio.d/archfs.preset:
    # mkinitcpio preset file for the 'archfs' package
    ALL_config="/etc/mkinitcpio.conf"
    ALL_kver="/boot/vmlinuz-linux"
    PRESETS=('archfs')
    archfs_config="/etc/mkinitcpio.conf"
    archfs_image="/boot/archfs-linux.lzo"
    archfs_options="-S fsck -A tmpfs -z lzop"
    Or append to the standard 'linux.preset' file so the initramfs is created automatically when you upgrade your kernel. Or alter /etc/mkinitcpio.conf to add options.
    Create the file /lib/initcpio/hooks/tmpfs:
    #!/usr/bin/ash
    run_latehook() {
    # Mount tmpfs root
    mount -t tmpfs tmpfs /mnt
    # Unpack rootfs
    msg "Unpacking rootfs..."
    cd /mnt
    # parse the kernel command line
    parse_cmdline
    for archfs in ${archfs//,/ }; do
    if [ "$archfs" = "xz" ]; then
    xz -d < /new_root/boot/archfs.xz | cpio -imd --no-absolute-filenames > /dev/null 2>&1
    elif [ "$archfs" = "gzip" ]; then
    gzip -dc /new_root/boot/archfs.gz | cpio -imd --no-absolute-filenames > /dev/null 2>&1
    elif [ "$archfs" = "lzo" ]; then
    lzop -d < /new_root/boot/archfs.lzo | cpio -imd --no-absolute-filenames > /dev/null 2>&1
    elif [ "$archfs" = "img" ]; then
    cpio -imd --no-absolute-filenames /new_root/boot/archfs.img > /dev/null 2>&1
    fi
    done
    # Switch tmpfs to new root
    umount /new_root
    mount -M /mnt /new_root
    # vim: set ft=sh ts=4 sw=4 et:
    And the file  /lib/initcpio/install/tmpfs:
    #!/bin/bash
    build() {
    add_dir /mnt
    add_module ext3
    add_binary cpio
    add_binary xz
    add_binary gzip
    add_binary lzop
    add_binary fsck.ext4
    add_symlink /usr/bin/fsck.ext2 fsck.ext4
    add_symlink /usr/bin/fsck.ext3 fsck.ext4
    add_runscript
    help() {
    cat <<HELPEOF
    This hook creates the tmpfs root, mounts the device that contains the
    rootfs and extracts it into the tmpfs root.
    HELPEOF
    # vim: set ft=sh ts=4 sw=4 et:
    This loads modules and fsck binaries for the filesystem of my /boot partition into the initramfs. It also adds all the relevant compression binaries (some which can also be compiled into busybox or left out if not needed). I'm working on automatically reading the filesystem from your /boot partition based on the "root=" kernel command line option and adding the appropriate modules.
    Create a new archfs.gz (or new extensions) with new cleaned up /usr/bin/archfs:
    http://pastebin.com/xiqgyYyL
    Now run with:
    # archfs lzo
    (or whichever crompression you choose). It also takes care of any mounting directories you have in /mnt. And "writefs" is no longer needed, that's all it does anyway.
    Then simply add the "root=(your boot partition)" and "archfs=lzo" (or whichever compression you chose) command line options to your grub.cfg.
    Run:
    # mkinitcpio -p archfs
    That'll create an initramfs: archfs-linux.lzo that you need to move to your boot partition with your kernel and archfs.gz. Then point grub to that as your initrd.
    This will boot and the tmpfs hook will do it's work just after init has mounted your boot partition and then init will switch roots and run /sbin/init as it would on any normal install.
    Mix and match as needed. You can remove the /init file from the root of your filesystem or leave it there and all but an xz compressed archfs.gz will boot the old way aswell (the kernel can't handle the xz version). It should all be fairly upgrade proof, barring any major changes to mkinitcpio.
    Boot for me with lzo compression is at least twice as fast as old method. Partly due to lzo compression which is super fast (especially creating the archfs.lzo). It makes for a bigger file but it's still only 350MB (pretty much half my uncompressed root filesystem).

  • [SOLVED] Backing up the system while the system is running?

    Is it ok if I backup the system while it's running? Or does it *have* to be done from a LiveCD?
    I was thinking of using this:
    $ sudo rsync -avx /* /mnt/Backup --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}
    Rsync will complain at the end that "some files/attrs were not transferred", but the backup works fine (as far as I can tell).
    Should I add "[...] > sometextfile.txt" at the end, to see which files weren't transfered right? Has anyone else done something like this before?
    Last edited by DSpider (2012-06-14 15:56:03)

    DSpider wrote:Rsync is not necessarily better, but it does the job. I'm planning on transferring the system to a loopback device (a raw .img file) which will serve as a container for chrooting, and later converting to .vdi for use in VirtualBox. It's a fun project I'm working on: "Moving an existing Arch install to VirtualBox" (title in progress). Maybe I'll write a wiki article, since I did it three times already... And it works, even if I back them up while the system is running. I was just wondering what those files were.
    Oh, alright.  Cool.  Yeah, I just wanted to check whether there was any important differences between tar and rsync.  I think I'll check the wiki and do some reading about the two, but from the sound of it, it sounds more like a matter of preference than anything else, which is groovy.
    Last edited by lspci (2012-06-13 15:08:01)

  • Complete arch (system) documentation?

    Hi. I would like to have arch and it's mechanisms and infrastructure completely documented. Of course this could be quite a large task, but i think people like me (who like to read the manual before using stuff) would appreciate this, and it would also serve to leverage the overall knowledge of archlinux, so that less people would ask "stupid questions" (i don't mean it like that.. ) on the forums.
    I also understand that this could realistically only be done for a "base" install arch system, as X11 and other applications/services go beyond the scope of such basic documentation.
    The reason i would like this is because i couldn't find anything like this on the wiki, _and_, it would also be nice to have something compiled in a form you could print out. (ie without further references, but a compilation).

    As far as a doc for experience users though i think that would be a waste, since most experienced users wouldn't need a doc to let them know how to edit a linux system.
    Not the arch linux specifics, take the init system as an example. How, and what files are used. How to write your own init/daemon. Did you for example know that daemons get registered in /var/run daemons when succesfully started? And that rc.multi/functions is responsible for that (and how)? Or that rc.sysinit is resposible for setting you system locale?
    Or how to use makepkg/makeworld in archlinux? Again, even if there already is a wiki entry about this, it should be a part of a compiled doc covering basic system maintenance in arch.
    Some of the already present wiki articles (like setting up a network connection) though already existing, should be a part of this documentation. If necessary, expand them.

  • Trusted system entry already exists for system SOL

    Hi,
    Im trying to add a second trusted system with smt1 transaction but the thing is that i've already have an identical SID for another system so i get the "Trusted system entry already exists for system SOL" message.
    is there any way to solve this??
    thanks in advance.
    regards.

    In  SM59 - in the RFC in question - Press "Technical Settings" tab - then press "Yes" to Load Balancing - this will populate the "Target Host" field.
    Then make sure that you here enter the system data for the Target System (Default it will display the Host System data which you will need to replace)
    Then go back to SMT1 - Press the "Create" button - and in the Wizard you enter the RFC connection as before... Now it should work.
    Regards,
    Lars

Maybe you are looking for

  • SAP XL Reporter for SAP R/3 ?

    Hi Experts,      SAP XL Reporter is an add-on provided by SAP only for SAP Business one? Doesn't it work for SAP R/3? Is there anyway to use SAP XL Reporter in R/3 also? If so, pls let me know. Regards, Ravi

  • PDF's not loading in browser - Internet Explorer 9, Adobe Reader X, Win 7 x64

    I have Adobe Acrobat Reader installed and have a site that uses forms that need to be filled and submitted.  The problem is that when I open the form, they are opening in a seperate Window. I've uninstalled and reinstalled Adobe Reader I've done 'det

  • Problem with lid closed mode

    So as far as i know, to get the computer to run in lid closed mode you press f7 until you get video mirroring, the second mode i believe, close the display, then wake the computer with the external mouse or keyboard. I've done this, but almost as soo

  • Debugging a User Exit

    Hi I would like to debug a program, and locate and fix an error in one of the user exits. How can I go about doing this? Please help to solve this. Regards Radha

  • Missing Utility Actions in SPD 2013

    Hi, I just installed SharepPoint Designer 2013 and found out some of the Utility actions (Find Substring in String, Replace Substring in String, Trim String) missing from the menu.  I got the installer and SP1 update on the download site.  Appreciate