You are not logged in.

#1 2012-01-07 11:54:34

Kruppt
Moderator
From: Blue Ridge Mountains, NC
Registered: 2010-12-20
Posts: 299

How To Retrieve Default files from an ArchBang ISO

Retrieving Default files from an ArchBang ISO...
To repair your OpenBox Menu or other.
Make sure you have about 4GB of free space to extract the images to,
at the location where the extraction/mount points will be created.
In this example, the ArchBang ISO resides on a partition on the second drive (sdb7)
To locate partition device locations on your system, run  command "fdisk -l"
from a root terminal. In Archbang this can be done as code box example below.

 sudo -i 

Once in the root shell, run below command.

 fdisk -l 

You will see similar output as shown  in below code box:

 
Determine your partition and intended mount points from your "fdisk -l" output.
[root@MS-7005-archbang ~]# fdisk -l

Disk /dev/sda: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x641cf370

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     1026047      512000   82  Linux swap / Solaris
/dev/sda4         1026048   586114703   292544328    5  Extended
/dev/sda5         1028096    63942655    31457280   83  Linux
/dev/sda6        63944704   126859263    31457280   83  Linux
/dev/sda7       126861312   189775871    31457280   83  Linux
/dev/sda8       189777920   252692479    31457280   83  Linux
/dev/sda9       252694528   420466687    83886080   83  Linux
/dev/sda10      420468736   462411775    20971520   83  Linux
/dev/sda11      462413824   586114703    61850440   83  Linux

Disk /dev/sdb: 40.0 GB, 40027029504 bytes
16 heads, 63 sectors/track, 77557 cylinders, total 78177792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd9afa677

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63    19532015     9765976+  83  Linux
/dev/sdb2        19532016    20509775      488880   82  Linux swap / Solaris
/dev/sdb3        20509776    20745647      117936   83  Linux
/dev/sdb4        20745648    78177455    28715904    5  Extended
/dev/sdb5        20745711    22700159      977224+  83  Linux
/dev/sdb6        22700223    61763183    19531480+  83  Linux
/dev/sdb7        61763247    78177455     8207104+  83  Linux

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
1 heads, 63 sectors/track, 15504336 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                                                                                                         
Disk identifier: 0x028232e4                                                                                                                                                                               
                                                                                                                                                                                                          
   Device Boot      Start         End      Blocks   Id  System                                                                                                                                            
/dev/sdc1            2048   976773167   488385560   83  Linux                                                                                                                                             

In this example the ArchBang ISO resides on /dev/sdb7 which has a mount point on
the current running system at /mnt/sdb7.
From the root shell/terminal, the mount point directories are made first, then mounted by running the commands in below code box.
(If the ArchBang ISO resides on /root of currently running system and you
plan to make mount points on this same partition ignore the following code box example)
For those who have the ArchBang ISO on a data partition other than root, substitute /dev/sd_whatever and /mnt/path_to/sd_whatever
in the following code box examples editing commands to reflect the true device name of the partition (data)
as was found via the output of "fdisk -l " run in the earlier example and create the mount point folder accordingly.

 mkdir -p /mnt/sdb7;mount /dev/sdb7 /mnt/sdb7

To be certain you have the available space to extract the ArchBang ISO
to the location you intend to do so, (about 4GB extra space to be safe)
run below command, and take note of the available space left on the partition you intend to use for image extraction/mounting.
(make sure this partition also is currently mounted before running the following command)

df -Th

Ok, now the mount points for the different extraction locations need to be made.
In this example they are going to be extracted to the current /root partition (currently running OS filesytem/partition)
So the mount point folders for extraction are created as in below code box example.

mkdir -p /mnt/iso;mkdir -p /mnt/sfs;mkdir -p /mnt/fs

Then we mount the ArchBang ISO as follows in the below code box.
Substitute the absolute path in  below command to reflect  the location of the ArchBang ISO location on your system,
and subsitute the actual name of the ISO file you intend to use.   

mount -o loop /mnt/sdb7/iso/archbang-2011.11-i686.iso /mnt/iso

After ISO has been mounted, and your back to root prompt, mount the root-image.fs.sfs image as in below code box.

mount -o loop /mnt/iso/arch/i686/root-image.fs.sfs /mnt/sfs -t squashfs

After the SFS image/file has been mounted, and your back to root prompt, mount the root-image.fs image/file as in below code box example.

mount -t ext4 /mnt/sfs/root-image.fs /mnt/fs

You can now access default configuration files and ect.,  as they are on the LiveCD.
Browse to /mnt/fs/  with your file manager. You can now, via your file manager or shell,
drill along path /mnt/fs and copy over default configuration files or whatever.
Hosed your Openbox menu.xml file? Hosed your Openbox rc.xml file?
Look in the /mnt/fs/home/live/.config/openbox folder. Copy over whatever files you need.
Borked some configuration files and need to refer to the originals?
Drill to /mnt/fs/etc. Want to know what binaries actually exist on the LiveCD?
Drill along path /mnt/fs/bin; /mnt/fs/sbin; /mnt/fs/usr/bin, and ect.

Offline

#2 2012-01-17 14:04:32

WASD
Member
Registered: 2012-01-17
Posts: 26

Re: How To Retrieve Default files from an ArchBang ISO

If you simply want to repair your Openbox Menu you can get the default files from /etc/skel/.config/openbox


I am active in the IRC.
#archbang on irc.freenode.net

Offline

Board footer

Powered by FluxBB