Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!
Showing posts with label GNU/Linux. Show all posts
Showing posts with label GNU/Linux. Show all posts

Tuesday, May 21, 2013

fakeRAID linux


https://wiki.archlinux.org/index.php/Installing_with_Fake_RAID
The purpose of this guide is to enable use of a RAID set created by the on-board BIOS RAID controller and thereby allow dual-booting of Linux and Windows from partitions inside the RAID set using GRUB. When using so-called "fake RAID" or "host RAID", the disc sets are reached from
What is "fake RAID"
From Wikipedia:
Operating system-based RAID doesn't always protect the boot process and is generally impractical on desktop versions of Windows. Hardware RAID controllers are expensive and proprietary. To fill this gap, cheap "RAID controllers" were introduced that do not contain a RAID controller chip, but simply a standard disk controller chip with special firmware and drivers. During early stage boot-up, the RAID is implemented by the firmware. When a protected-mode operating system kernel such as Linux or a modern version of Microsoft Windows is loaded, the drivers take over.
These controllers are described by their manufacturers as RAID controllers, and it is rarely made clear to purchasers that the burden of RAID processing is borne by the host computer's central processing unit -- not the RAID controller itself -- thus introducing the aforementioned CPU overhead which hardware controllers do not suffer from. Firmware controllers often can only use certain types of hard drives in their RAID arrays (e.g. SATA for Intel Matrix RAID, as there is neither SCSI nor PATA support in modern Intel ICH southbridges; however, motherboard makers implement RAID controllers outside of the southbridge on some motherboards). Before their introduction, a "RAID controller" implied that the controller did the processing, and the new type has become known in technically knowledgeable circles as "fake RAID" even though the RAID itself is implemented correctly. Adaptec calls them "host RAID".wikipedia:RAID
See Wikipedia:RAID or FakeRaidHowto @ Community Ubuntu Documentation for more information.
Despite the terminology, "fake RAID" via dmraid is a robust software RAID implementation that offers a solid system to mirror or stripe data across multiple disks with negligible overhead for any modern system. dmraid is comparable to mdraid (pure Linux software RAID) with the added benefit of being able to completely rebuild a drive after a failure before the system is ever booted.
History
In Linux 2.4, the ATARAID kernel framework provided support for fake RAID (software RAID assisted by the BIOS). For Linux 2.6 the device-mapper framework can, among other nice things like LVM and EVMS, do the same kind of work as ATARAID in 2.4. Whilst the new code handling the RAID I/O still runs in the kernel, device-mapper is generally configured by a userspace application. It was clear that when using the device-mapper for RAID, detection would go to userspace.
Heinz Maulshagen created the dmraid tool to detect RAID sets and create mappings for them. The controllers supported are (mostly cheap) fake RAID IDE/SATA controllers which contain BIOS functions. Common examples include: Promise FastTrak controllers; HighPoint HPT37x; Intel Matrix RAID; Silicon Image Medley; and NVIDIA nForce.
Information on supported hardware
RAID/Onboard @ Gentoo Linux Wiki

Backup

Warning: Backup all data before playing with RAID. What you do with your hardware is only your own fault. Data on RAID stripes is highly vulnerable to disc failures. Create regular backups or consider using mirror sets. Consider yourself warned!

Outline

  • Preparation
  • Boot the installer
  • Load dmraid
  • Perform traditional installation
  • Install GRUB

Preparation

  • Open up any needed guides (e.g. Beginners' Guide, Official Arch Linux Install Guide) on another machine. If you do not have access to another machine, print it out.
  • Download the latest Arch Linux install image.
  • Backup all important files since everything on the target partitions will be destroyed.

Configure RAID sets

Warning: If your drives are not already configured as RAID and Windows is already installed, switching to "RAID" may cause Windows to BSOD during boot.[1]
  • Enter your BIOS setup and enable the RAID controller.
    • The BIOS may contain an option to configure SATA drives as "IDE", "AHCI", or "RAID"; ensure "RAID" is selected.
  • Save and exit the BIOS setup. During boot, enter the RAID setup utility.
    • The RAID utility is usually either accessible via the boot menu (often F8, F10 or CTRL+I) or whilst the RAID controller is initializing.
  • Use the RAID setup utility to create preferred stripe/mirror sets.
Tip: See your motherboard documentation for details. The exact procedure may vary.

Boot the installer

See Official Arch Linux Install Guide#Pre-Installation for details.

Load dmraid

Load device-mapper and find RAID sets:
# modprobe dm_mod
# dmraid -ay
# ls -la /dev/mapper/
Warning: Command "dmraid -ay" could fail after boot to Arch linux Release: 2011.08.19 as image file with initial ramdisk environment does not support dmraid. You could use an older Release: 2010.05. Note that you must correct your kernel name and initrd name in grubs menu.lst after installing as these releases use different naming
Example output:
/dev/mapper/control            
- data-blogger-escaped-a="" data-blogger-escaped-by="" data-blogger-escaped-controller="" data-blogger-escaped-created="" data-blogger-escaped-dev="" data-blogger-escaped-device-mapper="" data-blogger-escaped-first="" data-blogger-escaped-functioning="" data-blogger-escaped-if="" data-blogger-escaped-image="" data-blogger-escaped-is="" data-blogger-escaped-likely="" data-blogger-escaped-mapper="" data-blogger-escaped-on="" data-blogger-escaped-partition="" data-blogger-escaped-pre="" data-blogger-escaped-present="" data-blogger-escaped-raid="" data-blogger-escaped-sata="" data-blogger-escaped-set="" data-blogger-escaped-sil_aiageicechah1="" data-blogger-escaped-sil_aiageicechah="" data-blogger-escaped-silicon="" data-blogger-escaped-this=""
If there is only one file (/dev/mapper/control), check if your controller chipset module is loaded with lsmod.
 If it is, then dmraid does not support this controller or there are no RAID sets on the system (check RAID BIOS setup again). If correct, then you may be forced to use software RAID (this means no dual-booted RAID system on this controller).
If your chipset module is NOT loaded, load it now. For example:
# modprobe sata_sil
See /lib/modules/`uname -r`/kernel/drivers/ata/ for available drivers. To test the RAID sets:
# dmraid -tay

Perform traditional installation

Switch to tty2 and start the installer:
# /arch/setup

Partition the RAID set

  • Under Prepare Hard Drive choose Manually partition hard drives since the Auto-prepare option will not find your RAID sets.
  • Choose OTHER and type in your RAID set's full path (e.g. /dev/mapper/sil_aiageicechah). Switch back to tty1 to check your spelling.
  • Create the proper partitions the normal way.
Tip: This would be a good time to install the "other" OS if planning to dual-boot. If installing Windows XP to "C:" then all partitions before the Windows partition should be changed to type [1B] (hidden FAT32) to hide them during the Windows installation. When this is done, change them back to type [83] (Linux). Of course, a reboot unfortunately requires some of the above steps to be repeated.

Mounting the filesystem

If -- and this is probably the case -- you do not find your newly created partitions under Manually configure block devices, filesystems and mountpoints:
  • Switch back to tty1.
  • Deactivate all device-mapper nodes:
# dmsetup remove_all
  • Reactivate the newly-created RAID nodes:
# dmraid -ay
# ls -la /dev/mapper
  • Switch to tty2, re-enter the Manually configure block devices, filesystems and mountpoints menu and the partitions should be available.
Warning: NEVER delete a partition in cfdisk to create 2 partitions with dmraid after Manually configure block devices, filesystems and mountpoints have been set.
(really screws with dmraid metadata and existing partitions are worthless)
Solution: delete the array from the bios and re-create to force creation under a new /dev/mapper ID, reinstall/repartition.

Install and configure Arch

Tip: Utilize three consoles: the setup GUI to configure the system, a chroot to install GRUB, and finally a cfdisk reference since RAID sets have weird names.
  • tty1: chroot and grub-install
  • tty2: /arch/setup
  • tty3: cfdisk for a reference in spelling, partition table and geometry of the RAID set
Leave programs running and switch to when needed.
Re-activate the installer (tty2) and proceed as normal with the following exceptions:
  • Select Packages
  • Ensure dmraid is marked for installation
  • Configure System
    • Add dm_mod to the MODULES line in mkinitcpio.conf. If using a mirrored (RAID 1) array, additionally add dm_mirror
    • Add chipset_module_driver to the MODULES line if necessary
    • Add dmraid to the HOOKS line in mkinitcpio.conf; preferably after sata but before filesystem

install bootloader

Use GRUB2

Please read GRUB2 for more information about configuring GRUB2. Currently, the latest version of grub-bios does not compatiable with fake-raid. If you got an error like this when you run grub-install:
 $ grub-install /dev/mapper/sil_aiageicechah
 Path `/boot/grub` is not readable by GRUB on boot. Installation is impossible. Aborting.
You could try an old version of grub. You could find old version package of grub at ARM Search. Read Downgrade for more information. 1. download an old version package for grub
  i686:
   http://arm.konnichi.com/extra/os/i686/grub2-bios-1:1.99-6-i686.pkg.tar.xz
   http://arm.konnichi.com/extra/os/i686/grub2-common-1:1.99-6-i686.pkg.tar.xz
  x86_64:
   http://arm.konnichi.com/extra/os/x86_64/grub2-bios-1:1.99-6-x86_64.pkg.tar.xz
   http://arm.konnichi.com/extra/os/x86_64/grub2-common-1:1.99-6-x86_64.pkg.tar.xz
  You could verify these packages by the .sig file if you take care.
2. install these old version packages by using "pacman -U *.pkg.tar.xz" 3. (Optional) Install os-prober if you have other OS like windows. 4. $ grub-install /dev/mapper/sil_aiageicechah 5. $ grub-mkconfig -o /boot/grub/grub.cfg 6. (Optional) put grub2-bios, grub2-common in /etc/pacman.conf's IgnorePkg array, if you don't want pacman upgrade it. That's all, grub-mkconfig will generate the configure automatically. You could edit /etc/default/grub to modify the configure (timeout, color, etc) before grub-mkconfig.

Use GRUB Legacy (Deprecated)

Warning: You can normally specify default saved instead of a number in menu.lst so that the default entry is the entry saved with the command savedefault. If you are using dmraid do not use savedefault or your array will de-sync and will not let you boot your system.
Please read GRUB Legacy for more information about configuring GRUB Legacy.
Note: For an unknown reason, the default menu.lst will likely be incorrectly populated when installing via fake RAID. Double-check the root lines (e.g. root (hd0,0)). Additionally, if you did not create a separate /boot partition, ensure the kernel/initrd paths are correct (e.g. /boot/vmlinuz-linux and /boot/initramfs-linux.img instead of /vmlinuz-linux and /initramfs-linux.img.
For example, if you created logical partitions (creating the equivalent of sda5, sda6, sda7, etc.) that were mapped as:
  /dev/mapper     |    Linux    GRUB Partition
                  |  Partition      Number
nvidia_fffadgic   |
nvidia_fffadgic5  |    /              4
nvidia_fffadgic6  |    /boot          5
nvidia_fffadgic7  |    /home          6
The correct root designation would be (hd0,5) in this example.
Note: If you use more than one set of dmraid arrays or multiple Linux distributions installed on different dmraid arrays (for example 2 disks in nvidia_fdaacfde and 2 disks in nvidia_fffadgic and you are installing to the second dmraid array (nvidia_fffadgic)), you will need designate the second array's /boot partition as the GRUB root. In the example above, if nvidia_fffadgic was the second dmraid array you were installing to, your root designation would be root (hd1,5).
After saving the configuration file, the GRUB installer will FAIL. However it will still copy files to /boot. DO NOT GIVE UP AND REBOOT -- just follow the directions below:
  • Switch to tty1 and chroot into our installed system:
# mount -o bind /dev /mnt/dev
# mount -t proc none /mnt/proc
# mount -t sysfs none /mnt/sys
# chroot /mnt /bin/bash
  • Switch to tty3 and look up the geometry of the RAID set. In order for cfdisk to find the array and provide the proper C H S information, you may need to start cfdisk providing your raid set as the first argument. (i.e. cfdisk /dev/mapper/nvidia_fffadgic):
    • The number of Cylinders, Heads and Sectors on the RAID set should be written at the top of the screen inside cfdisk. Note: cfdisk shows the information in H S C order, but grub requires you to enter the geometry information in C H S order.
Example: 18079 255 63 for a RAID stripe of two 74GB Raptor discs.
Example: 38914 255 63 for a RAID stripe of two 160GB laptop discs.
  • GRUB will fail to properly read the drives; the geometry command must be used to manually direct GRUB:
    • Switch to tty1, the chrooted environment.
    • Install GRUB on /dev/mapper/raidSet:
# dmsetup mknodes
# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/raidSet
grub> geometry (hd0) C H S
Exchange C H S above with the proper numbers (be aware: they are not entered in the same order as they are read from cfdisk). If geometry is entered properly, GRUB will list partitions found on this RAID set. You can confirm that grub is using the correct geometry and verify the proper grub root device to boot from by using the grub find command. If you have created a separate boot partition, then search for /grub/stage1 with find. If you have no separate boot partition, then search /boot/grub/stage1 with find. Examples:
grub> find /grub/stage1       # use when you have a separate boot partition
grub> find /boot/grub/stage1  # use when you have no separate boot partition
Grub will report the proper device to designate as the grub root below (i.e. (hd0,0), (hd0,4), etc...) Then, continue to install the bootloader into the Master Boot Record, changing "hd0" to "hd1" if required.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Note: With dmraid >= 1.0.0.rc15-8, partitions are labeled "raidSetp1, raidSetp2, etc. instead of raidSet1, raidSet2, etc. If the setup command fails with "error 22: No such partition", temporary symlinks must be created.[2] The problem is that GRUB still uses an older detection algorithm, and is looking for /dev/mapper/raidSet1 instead of /dev/mapper/raidSetp1.
The solution is to create a symlink from /dev/mapper/raidSetp1 to /dev/mapper/raidSet1 (changing the partition number as needed). The simplest way to accomplish this is to:
# cd /dev/mapper
# for i in raidSetp*; do ln -s $i ${i/p/}; done
Lastly, if you have multiple dmraid devices with multiple sets of arrays set up (say: nvidia_fdaacfde and nvidia_fffadgic), then create the /boot/grub/device.map file to help GRUB retain its sanity when working with the arrays. All the file does is map the dmraid device to a traditional hd#. Using these dmraid devices, your device.map file will look like this:
(hd0) /dev/mapper/nvidia_fdaacfde
(hd1) /dev/mapper/nvidia_fffadgic
And now you are finished with the installation!
# reboot

Troubleshooting

Booting with degraded array

One drawback of the fake RAID approach on GNU/Linux is that dmraid is currently unable to handle degraded arrays, and will refuse to activate. In this scenario, one must resolve the problem from within another OS (e.g. Windows) or via the BIOS/chipset RAID utility. Alternatively, if using a mirrored (RAID 1) array, users may temporarily bypass dmraid during the boot process and boot from a single drive:
  1. Edit the kernel line from the GRUB menu
    1. Remove references to dmraid devices (e.g. change /dev/mapper/raidSet1 to /dev/sda1)
    2. Append disablehooks=dmraid to prevent a kernel panic when dmraid discovers the degraded array
  2. Boot the system

Error: Unable to determine major/minor number of root device

If you experience a boot failure after kernel update where the boot process is unable to determine major/minor number of root device, this might just be a timing problem (i.e. dmraid -ay might be called before /dev/sd* is fully set up and detected). This can effect both the normal and LTS kernel images. Booting the 'Fallback' kernel image should work. The error will look something like this:
Activating dmraid arrays...
no block devices found
Waiting 10 seconds for device /dev/mapper/nvidia_baaccajap5
Root device '/dev/mapper/nvidia_baaccajap5' doesn't exist attempting to create it.
Error: Unable to determine major/minor number of root device '/dev/mapper/nvidia_baaccajap5'
To work around this problem:
  • boot the Fallback kernel
  • insert the 'sleep' hook in the HOOKS line of /etc/mkinitcpio.conf after the 'udev' hook like this:
HOOKS="base udev sleep autodetect pata scsi sata dmraid filesystems"
  • rebuild the kernel image and reboot

dmraid mirror fails to activate

Does everything above work correctly the first time, but then when you reboot dmraid cannot find the array? This is because Linux software raid (mdadm) has already attempted to mount the fakeraid array during system init and left it in an umountable state. To prevent mdadm from running, move the udev rule that is responsible out of the way:
# cd /lib/udev/rules.d
# mkdir disabled
# mv 64-md-raid.rules disabled/
# reboot
============================ ============================ HOWTO: Linux Software Raid using mdadm 1) Introduction: Recently I went out and bought myself a second hard drive with the purpose of setting myself up a performance raid (raid0). It took me days and a lot of messing about to get sorted, but once I figured out what I was doing I realised that it's actually relatively simple, so I've written this guide to share my experiences I went for raid0, because I'm not too worried about loosing data, but if you wanted to set up a raid 1, raid 5 or any other raid type then a lot of the information here would still apply. 2) 'Fake' raid vs Software raid: When I bought my motherboard, (The ASRock ConRoeXFire-eSATA2), one of the big selling points was an on board raid, however some research revealed that rather than being a true hardware raid controller, this was in fact more than likely what is know as 'fake' raid. I think wikipedia explains it quite well: http://en.wikipedia.org/wiki/Redunda...ependent_disks
Hybrid RAID implementations have become very popular with the introduction of inexpensive RAID controllers, implemented using a standard disk controller and BIOS (software) extensions to provide the RAID functionality. The operating system requires specialized RAID device drivers that present the array as a single block based logical disk. Since these controllers actually do all calculations in software, not hardware, they are often called "fakeraids", and have almost all the disadvantages of both hardware and software RAID.
After realising this, I spent some time trying to get this fake raid to work - the problem is that although the motherboard came with drivers that let windows see my two 250 GB drives as one large 500 GB raid array, Ubuntu just saw the two separate drives and ignored the 'fake' raid completely. There are ways to get this fake raid working under linux, however if you are presented with this situation then my advice to you is to abandon the onboard raid controller and go for software raid instead. I've seen arguments as to why software raid is faster and more flexible, but I think the best reason is that software raid is far easier to set up! 3) The Basics of Linux Software Raid: For the basics of raids try looking on Wikipedia again: http://en.wikipedia.org/wiki/Redunda...ependent_disks. I don't want to discuss it myself because its been explained many times before by people who are far more qualified to explain it than I am. I will however go over a few things about software raids: Linux software raid is more flexible than hardware raid or true raid because rather than forming a raid arrays between identical disks, the raid arrays are created between identical partitions. As far as I understand, if you are using hardware raid between (for example) two disks, then you can either create a raid 1 array between those disks, or a raid 0 array. Using software raid however, you could create two sets of identical partitions on the disks, and for a raid 0 array between two of those partitions, and a raid 1 array between the other two. If you wanted to you could probably even create a raid array between two partitions on the same disk! (not that you would want to!) The process of setting up the a raid array is simple:
  1. Create two identical partitions
  2. Tell the software what the name of the new raid array is going to be, what partitions we are going to use, and what type of array we are creating (raid 0, raid 1 etc...)
Once we have created this array, we then format and mount it in a similar way to the way we would format a partition on a physical disk. 4) Which Live CD to use: You want to download and burn the alternate install Ubuntu cd of your choosing, for example, I used:
Code:
ubuntu-6.10-alternate-amd64.iso
If you boot up the ubuntu desktop live CD and need to access your raid, then you will need to install mdadm if you want to access any software raid arrays:
Code:
sudo apt-get update
sudo apt-get install mdadm
Don't worry too much about this for now - you will only need this if you ever use the Ubuntu desktop cd to fix your installation, the alternate install cd has the mdadm tools installed already. 5) Finally, lets get on with it! Boot up the installer Boot up the alternate install CD and run through the text based installation until you reach the partitioner, and select "Partition Manually". Create the partitions you need for each raid array You now need to create the partitions which you will (in the next step) turn into software raid arrays. I recommend using the space at the start, or if your disks are identical, the end of your disks. That way once you've set one disk up, you can just enter exactly the same details for the second disk. The partitioner should be straightforward enough to use - when you create a partition which you intend to use in a raid, you need to change the type to "Linux RAID Autodetect". How you partition your installation is upto you, however there are a few things to bear in mind:
  1. If (like me) you are going for a performance raid, then you will need to create a separate /boot partition, otherwise grub wont be able to boot - it doesn't have the drivers needed to access raid 0 arrays. It sounds simple, but it took me so long to figure out.
  2. If, on the other hand, you are doing a server installation (for example) using raid 1 / 5 and the goal is reliability, then you probably want the computer to be able to boot up even if one of the disks is down. In this situation you need to do something different with the /boot partition again. I'm not sure how it works myself, as I've never used raid 1, but you can find some more information in the links at the end of this guide. Perhaps I'll have a play around and add this to the guide later on, for completeness sake.
  3. If you are looking for performance, then there isn't a whole load of point creating a raid array for swap space. The kernel can manage multiple swap spaces by itself (we will come onto that later).
  4. Again, if you are looking for reliability however, then you may want to build a raid partition for your swap space, to prevent crashes should one of your drives fail. Again, look for more information in the links at the end.
On my two identical 250 GB drives, I created two 1 GB swap partitions, two +150 GB partitions (to become a raid0 array fro my /home space), and two +40 GB partitions (to become a raid 0 array for my root space), all inside an extended partition at the end of my drives. I then also created a small 500 MB partition on the first drive, which would become my /boot space. I left the rest of the space on my drives for ntfs partitions. Assemble the partitions as raid devices Once you've created your partitions, select the "Configure software raid" option. The changes to the partition table will be written to the disk, and you will be allowed to create and delete raid devices - to create a raid device, simply select "create", select the type of raid array you want to create, and select the partitions you want to use. 
Remember to check which partition numbers you are going to use in which raid arrays - if you forget, hit  a few times to bring you back to the partition editor screen where you can see whats going on.
Tell the installer how to use the raid devices
Once you are done, hit finish - you will be taken back to the partitioner where you should see some new raid devices listed. Configure these in the same way you would other partitions - set them mounts points, and decide on their filesystem type.
Finish the instalation
Once you are done setting up these raid devices (and swap / boot partitions you decide to keep as non-raid), the installation should run smootly.
6) Configuring Swap Space
I mentioned before that the linux kernel automatically manages multiple swap partitions, meaning you can spread swap partitions across multiple drives for a performance boost without needing to create a raid array. A slight tweak may be needed however; each swap partition has a priority, and if you want the kernel to use both at the same time, you need to set the priority of each swap partition to be the same. First, type
Code:
swapon -s
to see your current swap usage. Mine outputs the following:
Code:
Filename                                Type            Size    Used    Priority
/dev/sda5                               partition       979956  39080   -1
/dev/sdb5                               partition       979956  0       -2
As you can see, the second swap partition isn't being used at the moment, and won't be until the first one is full. I want a performance gain, so I need to fix this by setting the priority of each partition to be the same. Do this in /etc/fstab, by adding pri=1 as an option to each of your swap partitions. My /etc/fstab file now looks like this:
Code:
# /dev/sda5
UUID=551aaf44-5a69-496c-8d1b-28a228489404 pri=1 swap sw 0 0
# /dev/sdb5
UUID=807ff017-a9e7-4d25-9ad7-41fdba374820 pri=1 swap sw 0 0
 7) How to do things manually
As I mentioned earlier, if you ever boot into your instalation with a live cd, you will need to install mdadm to be able to access your raid devices, so its a good idea to at least roughly know how mdadm works. 
http://man-wiki.net/index.php/8:mdadm has some detailed information, but the important options are simply:
Code:
  • -A, --assemble Assemble a pre-existing array that was previously created with --create.
  • -C, --create Create a new array. You only ever need to do this once, if you try to create arrays with partitions that are part of other arrays, mdadm will warn you.
  • --stop Stop an assembled array. The array must be unmounted before this will work.
When using --create, the options are:
Code:
mdadm --create md-device --chunk=X --level=Y --raid-devices=Z devices
  • -c, --chunk= Specify chunk size of kibibytes. The default is 64.
  • -l, --level= Set raid level, options are: linear, raid0, 0, stripe, raid1, 1, mirror, raid4, 4, raid5, 5, raid6, 6, multipath, mp, fautly.
  • -n, --raid-devices= Specify the number of active devices in the array.
 for example:
Code:
mdadm --create /dev/md0 --chunk=4 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1
will create a raid0 array /dev/md0 formed from /dev/sda1 and /dev/sdb1, with chunk size 4. When using --assemble, the usage is simply:
Code:
mdadm --assemble md-device component-devices
for example
Code:
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
Which will assemble the raid array /dev/md0 from the partitions /dev/sda1 and /dev/sdb1 Alternatively you can use:
Code:
mdadm --assemble --scan
and it will assemble any raid arrays it can detect automatically. Lastly,
Code:
mdadm --stop /dev/md0
will stop the assembled array md0, so long as its not mounted. If you wish you can set the partitions up yourself manually using fdisk and mdadm from the command line. Either boot up a desktop live cd and apt-get mdadm as described before, or boot up the alternate installer and hit escape until you see a list of the different stages of instalation - the bottom one should read execute shell - which will drop you at a shell with fdisk, mdadm and mkfs etc... available. Note that if you ever need to create another raid partition, you create filesystems on them in exactly the same way you would a normal physical partition. For example, to create an ext3 filesystem on /dev/md0 I would use:
Code:
mkfs.ext3 /dev/md0
And to create a swapspace on /dev/sda7 I woud use:
Code:
mkswap /dev/sda7
Lastly, mdadm has a configuration file located at
Code:
/etc/mdadm/mdadm.conf
this file is usually automatically generated, and mdadm will probably work fine without it anyway. If you're interested then http://man-wiki.net/index.php/5:mdadm.conf has some more information. And that's pretty much it. As long as you have mdadm available, you can create / assemble raid arrays out of identical partitions. Once you've assembled the array, treat it the same way you would a partition on a physical disk, and you can't really go wrong! I hope this has helped someone! At the moment I've omitted certain aspects of dealing with raids with redundancy (like raid 1 and raid 5), such a rebuilding failed arrays, simply because I've never done it before. Again, I may have a play around and add some more information later (for completeness), or if anyone else running a raid 1 wants to contribute, it would be most welcome. Other links The Linux Software Raid Howto: http://tldp.org/HOWTO/Software-RAID-HOWTO.html This guide refers to a package "raidtools2" which I couldn't find in the Ubuntu repositories - use mdadm instead, it does the same thing. Quick HOWTO: Linux Software Raid http://www.linuxhomenetworking.com/w..._Software_RAID Using mdadm to manage Linux Software Raid arrays http://www.linuxdevcenter.com/pub/a/...2/05/RAID.html Ubuntu Fake Raid HOWTO In the community contributed documentation https://help.ubuntu.com/community/Fa...ght=%28raid%29 ============================ https://bugs.launchpad.net/linuxmint/+bug/682315 dmraid and kpart?
$ sudo dmraid -a y 
$ sudo dmraid -r $ sudo dmraid -l To fix this problem fast I added "dmraid -ay" at the bottom of the script so it did the trick for me but somebody should look deeper in to this. ====================== http://forums.linuxmint.com/viewtopic.php?f=46&t=105725 Do you have to use bios raid? Linux raid, mdadm, is recommended. The problem you are having is probably due to your Grub and/or your OS not having dmraid support. This is because the Installer only does half the job. Presumably you booted the live CD and installed dmraid, then installed to the raid device and Grub install failed. At this point you need to chroot into the raid and install dmraid, update initramfsand reconfigure grub. https://help.ubuntu.com/community/Grub2 ... ing#ChRoot sudo apt-get install dmraid sudo update-initramfs -u sudo dpkg-reconfigure grub-pc --------------------- How-to install LinuxMint or Ubuntu of softraid / fakeraid the simple way:
  1. Install Linux using the default installer program (let it do the partitioning unless you have specific requirements)
  2. When grub fails at the end of the install select install grub manually
  3. chroot into system installed on raid (fake or soft) https://help.ubuntu.com/community/Grub2/Installing#ChRoot
  4. grub-install on the TOP level partition of the raid
  5. update-grub
  6. Reboot and enjoy linux
======================= http://ubuntuforums.org/showthread.php?t=2089865&page=2 The possibility is a partition table irregularity which confuses the installer. Fairly easily fixed, but if your drive was not used in a RAID, lets see if this is so. Close the installer and open a terminal. Run this command and post the output:
Code:
sudo fdisk -lu
and then
Code:
sudo parted -l
I have suggested both as you may have GPT partitions and a UEFI bios. 
----------------------
Is a Intel SRT system. Those tend to be a large hard drive and small SSD to speed Windows up. Each vendor slightly different but the Intel part is the same. Some delete the SRT and install Linux to the SSD, others turn off SRT in Windows and have to use the RAID commands to remove RAID settings. 
Then after install they seem to be able to re-implement the SRT, but I do not then think Linux sees Windows. Intel Smart Response Technology http://www.intel.com/p/en_US/support...ts/chpsts/imsm Intel SRT - Dell XPS http://ubuntuforums.org/showthread.php?t=2038121 http://ubuntuforums.org/showthread.php?t=2036204 http://ubuntuforums.org/showthread.php?t=2020155 Some info on re-instating http://ubuntuforums.org/showthread.php?t=2038121 http://ubuntuforums.org/showthread.php?t=2070491 Disable the RAID, for me it was using the Intel rapid management thingy and telling it to disable the acceleration or the use of the SSD. If you have a different system, just disable the RAID system then install Ubuntu. Once installed you can then re-enable it.
You will need to use the dmraid command prior to running the Ubuntu Installer so that it will be able to see the partitions on the drive because otherwise with the raid metadata in place it will see the drive as part of a raid set and ignore its partitions. 
Try first to remove the dmraid package from Linux.
Code:
sudo apt-get remove dmraid

Sunday, May 12, 2013

Borrando Ubuntu

http://wiki.ubuntuusers.de/Ubuntu_entfernen
Die prinzipielle Vorgehensweise:
  1. Backup wichtiger Daten
  2. Von der Windows-Installations-CD booten (DOS-Diskette)
  3. Reparaturkonsole benutzen, um den Linux-Bootmanager zu entfernen
  4. Partitionen neu strukturieren
Backups
Hierzu muss man nicht viel sagen. Backups wichtiger Daten sollten regelmäßig erstellt und unabhängig vom Rechner gelagert werden. Backups auf dem selben Computer zu speichern von dem sie stammen, bieten nur unzureichende Sicherheit! Am besten brennt man die Daten auf CD/DVD oder lagert sie auf einer externen Festplatte aus.
Welche Installations-CD, welches Passwort?
Man benötigt eine Windows-CD (ab Windows 2000) oder die Super Grub Disc, um den Bootsektor wiederherzustellen und so die Bootmanager Lilo bzw. GRUB (Ubuntu verwendet GRUB) zu entfernen.
Die Windows 2000-CD hat den großen Vorteil, dass sie es erlaubt, ohne Administratorpasswort eine Reparaturkonsole zu öffnen. In der Wiederherstellungskonsole der Windows XP-CD wird man im Gegensatz dazu nach dem Administratorpasswort gefragt, bevor man in die Konsole gelangt. Mit Administratorpasswort ist in der Tat das Passwort des Windowsaccounts "Administrator" gemeint. Es ist nicht möglich, sich als User mit Administratorrechten einzuloggen.
Ab Windows Vista ist das Entfernen des Bootloaders und Wiederherstellung des Windows-Bootloaders mit dem Hilfsprogramm "Bootrec.exe" in der Windows-Wiederherstellungsumgebung möglich.
Die Super Grub Disk hat den Vorteil, dass sie Open Source ist und kleiner als 5 MB groß ist. Mit einem Klick wird die Wiederherstellung vollzogen.
Windows Reparaturkonsole / Wiederherstellungskonsole
Windows XP
Bei Windows XP bootet man den Rechner mit der Installations-CD, danach
  • wartet man einfach bis zur ersten Abfrage (nicht F2 für "automatische Systemwiederherstellung" drücken). Bei der ersten Abfrage drückt man R und wartet, bis die Wiederherstellungskonsole gestartet ist; oder
  • drückt man beim ersten "blauen Bildschirm" F10 , um direkt zur Wiederherstellungskonsole zu wechseln. (Quelle siehe Links)
Jetzt sollte ein Konsolenbildschirm erscheinen mit der Frage, an welcher Windowsinstallation man sich anmelden möchte. Nun einfach die Zahl vor der wiederherzustellenden Installation eingeben und mit ⏎ bestätigen. Jetzt sollte man das Administratorpasswort parat haben. Einfach eingeben und wieder mit ⏎ bestätigen. Anschließend die folgenden Befehle ausführen, wobei X: durch den Laufwerksbuchstaben zu ersetzen ist, das die wiederherzustellende Windowsinstallation enthält.
Befehle in der Reparatur- / Wiederherstellungskonsole
Dieser Befehl richtet den MasterBootRecord (MBR) neu ein:
fixmbr 
Dieser Befehl richtet den Startsektor (auch Bootsektor genannt) der Systempartition neu ein. Im Allgemeinen befindet sich diese auf dem Windows-Laufwerk C:
fixboot c: 
fixboot ohne Angabe eines Laufwerks schreibt einen neuen Bootsektor auf dem Laufwerk bei dem man sich beim Aufruf der Reparaturkonsole angemeldet hat.
Die Programme fragen in ziemlich beängstigendem Ton, ob man sich wirklich ganz sicher ist, da eventuell alle Daten auf der Festplatte zerstört werden können. In der Tat ist diese ganze Aktion nicht ganz ohne Risiko (siehe Backups), normalerweise sollte es jedoch keine Schwierigkeiten geben.
Administratorpasswort unter Windows XP eingeben
Unter "Start -> Systemsteuerung -> Verwaltung -> Computerverwaltung" findet man den Eintrag "Lokale Benutzer und Gruppen". Sollte das Fenster "Systemsteuerung" keinen Eintrag "Verwaltung" aufweisen, klickt man in der linken Fensterhälfte auf "Zur klassischen Ansicht wechseln". Ein Unterpunkt hiervon ist "Benutzer". Hier findet man den Account "Administrator". (Zugriff auf das Administrator-Konto hat man bei XP-Home nur im abgesicherten Modus unter Start/Systemsteuerung/Benutzerkonten.) Diesen mit der linken Maustaste anwählen und den Eintrag "Kennwort festlegen" öffnen. Jetzt sollte eine Warnung erscheinen, diese kann problemlos mit "Fortsetzen" beendet werden. In dem darauffolgenden Dialog vergibt man nun ein Kennwort und wiederholt dieses. Dann mit "Ok" bestätigen und den Rechner mit der eingelegten Windows XP-CD neustarten.
Windows Vista und Windows 7
Als erstes werden Linux-Partitionen unter Windows in der Datenträgerverwaltung gelöscht.
Bevor das Hilfsprogramm Bootrec.exe zur Wiederherstellung des Windows-Bootloaders ausgeführt werden kann, muss die Windows-Wiederherstellungsumgebung gestartet werden. Dazu geht man folgendermaßen vor:
  1. Windows-Installationsdatenträger in das CD- oder DVD-Laufwerk einlegen und damit booten
  2. Bei Aufforderung eine Taste drücken
  3. Sprache, Zeit, Währung sowie eine Tastatur oder eine Eingabemethode wählen und auf "Weiter" klicken
  4. "Computer reparieren" anwählen
  5. Im Dialogfeld Systemwiederherstellungsoptionen auf "Eingabeaufforderung" klicken
Befehle in der Reparatur- / Wiederherstellungskonsole
Dieser Befehl listet die Befehle in der Reparatur- / Wiederherstellungskonsole auf:
bootrec 
Dieser Befehl listet die installierten Betriebsysteme auf:
bootrec /ScanOs 
Dieser Befehl richtet den MasterBootRecord (MBR) neu ein:
bootrec /fixmbr  
Dieser Befehl richtet den Startsektor (auch Bootsektor genannt) der Systempartition neu ein:
bootrec /fixboot  
Dieser Befehl durchsucht alle Datenträger nach Installationen, die mit Windows Vista bzw. Windows 7 kompatibel sind. Außerdem kann man über diese Option die Installationen auswählen, die dem Speicher für Startkonfigurationsdaten hinzugefügt werden sollen. Diese Option wird verwendet, wenn die Startkonfigurationsdaten neu erstellt werden müssen:
bootrec /RebuildBcd 
System neu starten, Fertig!
Hier gibt es mehr Informationen: Microsoft Support Seite {de} .
Wiederherstellen des MBR ohne Windows CD
Achtung!
Eine fehlerhafte Verwendung der nachfolgend beschriebenen Anwendungen kann möglicherweise zu einem Totalverlust der Daten auf der Festplatte führen! Es wird dringend angeraten, die wichtigsten Daten in einem Backup zu sichern.
Wiederherstellen mit der Anwendung MbrFix
Hat man keine Windows-CD mit Reparaturkonsole zur Hand, hilft das Programm MbrFix.exe weiter (Download {dl} {en}, Anleitung {en}). Man installiert die .exe in Windows und öffnet dann unter Windows ein Terminalfenster durch die Eingabe von cmd.exe. Folgendes muss eingegeben werden:
MbrFix /drive  fixmbr 
wobei für die Laufwerksnummer (Zählung beginnt mit Null) anzugeben ist. Falls Windows Vista verwendet wird, lautet der Befehl:
MbrFix /drive  fixmbr /vista 
Wiederherstellen mit der Super Grub Disc
Eine weitere Möglichkeit, den ursprünglichen MBR von Windows wiederherzustellen, bietet die sogenannte Super Grub Disk.
Eigentlich wurde diese Disk konzipiert, um den Linux-Bootloader GRUB auf den MBR zu schreiben bzw. um die zu bootende Partition selber auszuwählen. Die Software eignet sich allerdings auch hervorragend, um einen bestehenden GRUB zu entfernen und den ursprünglichen, eventuell von Microsoft bereitgestellten Bootloader zu reaktivieren.
Auf der Homepage {en} findet man ein sehr ausführliches Wiki, wo man alles nachlesen kann und ein kleines ISO-Image, welches man am besten auf eine CD brennt. Ist im BIOS das Booten vom DVD- bzw. CD-ROM Laufwerk aktiviert, startet das Programm und man kann mit einem ENTER-Klick die ganze Sache wiederherstellen.
Wiederherstellen unter VISTA und WINDOWS 7
Um den MBR für Windows VISTA bzw. Windows 7 wieder herzustellen, ist die Windows-Anwendung EasyBCD oder ein vergleichbares Tool anzuwenden, das auf die speziellen Gegebenheiten des Bootmanager bcdedit abgestimmt ist. Die Anwendung EasyBCD hat einen eigenen Menüpunkt ("BCD Backup/Repair") zum Wiederherstellen des MBR. Dieses Tool berücksichtig auf welcher Partition das Windows installiert ist bzw. wo ein Recovery abgelegt wurde.
Auf der Homepage {us} findet man eine kurze Beschreibung {en} und den EasyBCD {dl} Download.
Ubuntu_entfernen/EasyBCD-Setting.png Die Anwendung wird wie unter Windows üblich, mit Doppelklick auf die exe-Datei (oder unter Berücksichtigung von Administrator-Rechten im Terminal) installiert. Nach dem Start der Anwendung wird der entsprechende Menüpunkt "BCD Backup/Repair" aufgerufen. Bei den
  • BCD Management Optionen
(siehe Abbildung) wird der zweite Button
  • Re-create/repair boot files
ausgewählt und mit "Perform Action" (Anwendung ausführen) der MBR neu geschrieben. Bei mehr als einer Festplatte wird zusätzlich noch die relevante HDD abgefragt.
Nach der Reparatur / Wiederherstellung des MBR und einem Reboot kann diese Anwendung wieder über die Systemsteuerung problemlos entfernt werden.
Neustart ohne Linux
Der Rechner kann jetzt einfach per Reset neu gestartet werden. Das Boot-Menü sollte nun nicht mehr angezeigt werden, da der MBR ja wieder mit dem Windows-Bootmanager überschrieben wurde.
Möchte man nun auch wieder den Speicherplatz - den Linux nach wie vor belegt - unter Windows nutzen, so können die Linux-Partitionen - auch nachträglich - gelöscht werden. Dazu öffnet man
  • "Systemsteuerung -> Computerverwaltung -> Datenträgerverwaltung"
und löscht dort die Linux-Partitionen. Der nun freie Speicher kann beliebig in neue Partitionen aufgeteilt und formatiert werden. Bei Bedarf kann man mit kommerziellen Programmen wie Partition Magic oder Acronis Disk Director den freien Speicher auch bestehenden Paritionen zuordnen.
MBR mit DOS-Diskette wiederherstellen
Es gibt auch die Möglichkeit, den MBR mit Hilfe einer DOS-Bootdiskette und des Programms fdisk wiederherzustellen.
Dazu von einer solchen Diskette booten und den Befehl
fdisk /mbr 
eingeben.
Sollte nur ein Windows XP zur Verfügung stehen, um die Bootdiskette zu erstellen, so wird kein fdisk auf diese kopiert. In diesem Fall kann XFDISK {de} genutzt werden. Das .zip-Archiv herunterladen, entpacken und zusätzlich auf die Diskette kopieren.
Achtung!
Diese Variante wurde nur mit Windows XP getestet. Ältere Windows Versionen sollten ebenfalls keine Probleme bereiten. Ein solches Vorgehen unter Windows Vista und neuer führt möglicherweise nicht zum Erfolg oder richtet sogar Schaden an!
Der Befehl lautet dann:
xfdisk /MBR 
Linux Partitionen sichern und in NTFS oder FAT32 rückkonvertieren
Falls noch Linux-Partitionen (inklusive der Swap-Partition) vorhanden sein sollten, können diese unter Windows in ein kompatibles Dateisystem wie beispielsweise NTFS konvertiert werden, wobei dabei allerdings sämtliche Dateien auf der Partition verloren gehen.
Möchte man die Daten von einem Ext2 oder Ext3 System sicherstellen, kann man diese Linux-Partitionen mit der Freeware EXT2 IFS {en} unter Windows lesen, beschreiben und gegebenenfalls archivieren, bevor man die Partitionen löscht bzw. umwandelt.
Gibt man in der Windows-Eingabeaufforderung
diskmgmt.msc
ein, öffnet sich die Datenträgerverwaltung, wo man nun Linux-Partitionen und Swap in NTFS oder FAT32 rückkonvertieren kann.

Friday, March 22, 2013

BackTrack

http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/BackTrack-9477.shtml
The highest rated and acclaimed Linux security distribution to date
BackTrack is a Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking. Regardless if you’re making BackTrack your primary operating system, booting from a LiveDVD, or using your favorite thumbdrive, BackTrack has been customized down to every package, kernel configuration, script and patch solely for the purpose of the penetration tester.
BackTrack is intended for all audiences from the most savvy security professionals to early newcomers to the information security field. BackTrack promotes a quick and easy way to find and update the largest database of security tool collection to-date.
Our community of users range from skilled penetration testers in the information security field, government entities, information technology, security enthusiasts, and individuals new to the security community. Feedback from all industries and skill levels allows us to truly develop a solution that is tailored towards everyone and far exceeds anything ever developed both commercially and freely available.
Whether you’re hacking wireless, exploiting servers, learning, performing a web application assessment, or social-engineering a client, BackTrack is the one-stop-shop for all of your security needs.
The evolution of BackTrack spans many years of development, penetration tests, and unprecedented help from the security community. BackTrack originally started with earlier versions of live Linux distributions called Whoppix, IWHAX, and Auditor. When BackTrack was developed, it was designed and developed by seasoned security professionals to perform penetration testing from one live CD and not leave remnants of the on the laptop itself. It has since expanded to being the most widely adopted penetration testing framework in existence and is used by the security community all over the world.
Product's homepage
What's New in This Release: [ read full changelog ]
· After months of development, bug fixes, upgrades, and the addition of 42 new tools, we are happy to announce the full release of BackTrack 5 R2 available for download now. Running our custom-built 3.2.6 kernel with the best wireless support available, this is our fastest and best release of BackTrack yet. In the past few weeks, we have had a flood of submissions to our BackTrack Redmine Tracker with submissions for many new tools and dozens of packages that needed to be updated and this has helped to make this one of the strongest releases we’ve ever had.
· Once again, our good friends over at Paterva have created a special BackTrack edition of Maltego 3.1.0 for your data mining pleasure and we have also included their recently-released CaseFile tool to help you organize and collate data from numerous sources. If you have never used these tools before, you really need to…they will change the way your interact with data and conduct reconnaissance.
· You will also find we have included Metasploit 4.2.0 Community Edition, version 3.0 of the Social Engineer Toolkit, BeEF 0.4.3.2, and many other tool upgrades too numerous to mention.

palimpsest -GNOME disk utility - Disks

http://www.softpedia.com/reviews/linux/Disks-Review-309577.shtml

A udisks graphical frontend included in the gnome-disks package. Disks can be used for partition management, S.M.A.R.T. monitoring, benchmarking, and software RAID. An introduction is included in the GNOME Documentation Project.

 Download Disks
 Features:

• S.M.A.R.T. monitoring
• Benchmarking tools
• Partition manager
• Disk manager


Enlarge picture
Ubuntu operating systems always pride themselves with the ease of use and Canonical has tried to provide users with facile access to certain features. Disks falls into this category, allowing people to simply interact with the storage devices.
One of the things changed in Ubuntu 12.10 was Disks. It seems that not too many people use it, although it provides great functionality.
Before being called Disks, its name was GNOME Disk Utility or Palimpsest. There is a tendency nowadays to shorten the name of the applications and then name them to better reflect what they actually do.

This is how Nautilus turned into Files and how GNOME Disk Utility turned into Disks. It sounds uninteresting, but the fact is that the developers are right.

In any case, Disks is based on the “udisks” project and comes with a very pretty and un-Linux-y interface. The former disk management interface was nice, but this one is downright gorgeous, albeit it’s also clumsy and hard to get around. It’s like the winner of a beauty pageant who has yet to go to school.

Installation
As stated in the beginning of the review, Disks comes with Ubuntu 12.10, but it is part of the GNOME project, so there is also a source package available.
Being part of GNOME doesn’t stop it from being adopted by most of the major distributions, such as Fedora, Ubuntu, Red Hat, and CentOS.
Unless you really know what you are doing, installing the software from source is not advisable. In any case, there are proper installation procedures inside the archive.

Usage
We tested Disks in Ubuntu 12.10 and the version installed was 3.6.1. It has a very simple interface detailing all the disks mounted and unmounted from the operating system.
Clicking one of the drives will provide all the primary information about it, such as how many partitions there are, what kind, if they are mounted, which ones have operating systems, and which ones contain the Filesystem root.
This main screen also provides the necessary information about partitioning. Disks can be used to partition the hard drive, just like Gparted for example.
There are three major buttons. The first one is an arrow or square (like the play button) which can be used to mount and unmount drives.
The second button is called delete partition, and we all know what this one does. The third and final one offers access to a lot more tools and it’s simply called More Actions.

Users can format the drive, change the default Filesystem (you should be careful dealing with these options unless you know what you are doing), Edit Mount Options, create a disk image for backup and restoring that backup.
If the user has chosen to encrypt the partition during the Ubuntu 12.10 installation, a few other options are also available for that particular feature.
Disks has an interesting option for drive settings, which have been designed with laptops in mind. Users can choose the Timeout value for standby, a very important feature if you want to prolong the battery life of a laptop, for example. It can also be done with the PC, but it’s less relevant in that case.
Beside these rather advanced features, Disk also offers a benchmarking tool, which is pretty quick and reliable and can access the hard disks’ SMART data, with detailed explanations for all the indicators.

The Bad
First of all, there should have been some kind of integration with Nautilus. Imagine that you’re a first-time user and you want to format a USB drive. If you come from a Windows background for example, you know that the format option is available in right click.
Not in Ubuntu 12.10. You have to open Disks and figure out what to do. You have to deduce that the drive has to be unmounted and then click on the More Action, followed by format. It would have been a lot easier to implement format in right click, even in Disks.
The problem with Disks is that it has a superb interface that invites you to use it, but the options are crammed in and not at all as transparent as they should be.

The Good
As stated before, the interface is a shining example of what can be achieved in Linux. It looks like a modern tool, with all the right trimmings and fits amazingly in Ubuntu 12.10.
Its most redeeming quality is the fact that it provides average users with the impression that everything is done easily and with precision.

Conclusion
Even though Disks or Palimpsest is not as functional as it is nice, it's still one of the best tools of its kind. The proof of this is the integration in so many famous distributions.

If the developers continue to work on it and improve it in the same manner they’ve done so far, there’s no doubt that it’s bound to surpass any other rival applications.


Enlarge picture

Enlarge picture

Enlarge picture

Enlarge picture

Friday, March 15, 2013

Installing correctly the WLAN in linux HP machines

http://askubuntu.com/questions/225297/wireless-not-working-hp-probook-4540s
Managed to run it on the terminal but the following message appears:
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
I run sudo apt-get update, but the same message remains. It is not possible to continue as the following text appears:
sudo make && sudo make install && sudo make clean
make: *** No targets specified and no makefile found.  Stop.
What can I do?
==================
payorivero
Please, download this, and put it into your "Downloads" folder in ubuntu:
http://dl.dropbox.com/u/19624249/Driver.tar
That is the driver for your network card, and i am now going to show you how to install it. This file was downloaded from a bigger package on the internet. Download on own risk.
Extract all the files in the archive into a folder named "Driver" in your "Downloads".
Now, open a terminal by prssing Ctrl+Alt+T, and type:
sudo apt-get install linux-headers-$(uname -r) build-essential dkms
cd Downloads/Driver
Now, to install it:
sudo make && sudo make install && sudo make clean
Then, when it finish:
Blacklist the built-in driver, and load the new one with:
echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/blacklist-rt2800pci.conf
sudo modprobe -rfv rt2800pci
sudo modprobe -v rt3259sta
And reboot, and it should work!

Wednesday, November 21, 2012

Linux vs. MS (again)

Five things Desktop Linux has to do to beat Windows 8
Summary: Microsoft, as it did with Vista, is giving Linux another chance to make the gains in the PC market with Windows 8, but can Linux take advantage of this opportunity?

ISPConfig 3 and CentOS 6.3

Complete Story
This tutorial shows how to prepare a CentOS 6.3 x86_64 server for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache web server, Postfix mail server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman, and many more. Since version 3.0.4, ISPConfig comes with full support for the nginx web server in addition to Apache; this tutorial covers the setup of a server that uses Apache, not nginx.

Tuesday, November 20, 2012

Router or firewall distros

en.wikipedia.org/wiki/List_of_router_or_firewall_distributions
...
Astaro is it's own Linux distribution, running a 2.6.16 kernel (in Astaro 7).
Astaro is partially based on Suse, and uses RPM for it's package management.
=======================
Comparison of firewalls
List of wireless router firmware projects

Saturday, September 29, 2012

Jungo

Jungo Ltd is a provider of residential and business gateway software platforms and applications. Jungo Ltd. is an NDS Group Plc Company. The NDS Group is the leading supplier of open end-to-end digital pay-TV solutions for the secure delivery of entertainment and information to television set-top boxes and personal computers.[citation needed] The company's headquarters are in San Jose, California and its development center is based in Netanya, Israel.
http://www.jungo.com/support/gateway-solutions/

Friday, December 9, 2011

Compiz in Linux Mint

Siphax Says:
Compiz 0.8.6 + emrald 0.8.8 + Mate is stable
sudo apt-get purge compiz compiz-plugins-extra compiz-plugins-main
sudo apt-get purge compizconfig-settings-manager
sudo apt-get purge libemeraldengine0 emerald
libgnome-window-settings1
wget http://mirror.pnl.gov/ubuntu//pool/main/g/gnome-control-center/libgnome-window-settings1_2.32.1-0ubuntu15_i386.deb
libprotobuf6
wget http://mirror.pnl.gov/ubuntu//pool/main/p/protobuf/libprotobuf6_2.3.0-4ubuntu2_i386.deb
sudo dpkg install *.deb
sudo gedit /etc/apt/sources.list
deb http://ppa.launchpad.net/guido-iodice/compiz-0.8.6-natty/ubuntu natty main
deb-src http://ppa.launchpad.net/guido-iodice/compiz-0.8.6-natty/ubuntu natty main
sudo apt-get update
sudo apt-get install compiz compiz-core compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-fusion-plugins-unsupported compiz-gnome compiz-plugins compizconfig-backend-gconf compizconfig-settings-manager libcompizconfig0 libdecoration0 python-compizconfig emerald
http://compiz-themes.org/?xcontentmode=103
emerald –replace
compiz –replace

Sunday, November 6, 2011

Install (zet old) ubuntu on fakeraid

As far as I know Grub 2 doesn't work with RAID yet (February 16th, 2010). That's why we have to deal with setting up Grub Legacy here in the first place!
Source by gilson585
This is how I installed 9.10 karmic onto a stripped fakeraid Raid 0 array. These instructions may or may not work for a mirrored raid 1 array, I have gotten limited feedback on this. All you really need is the LiveCD and an internet connection. The steps outlined here are used after Ubuntu has been installed but fails to boot. Just load the LiveCD environment and follow these steps. Mind you this may be a daunting task to a person new to Ubuntu but if you have any command line experience you should be fine. I made this how-to cause I felt many others were lacking in some areas. I had searched around the net and found bits and pieces to make this work and thought how nice to have it all in one spot so here it is. ##Note this works on ext4 w/o any patch, 9.10 no longer requires install via Alternate CD as the LiveCD has dmraid included, also note fdisk does not work well with dmraid use gparted instead.
1. Open a terminal: Applications, Accessories, Terminal.
2. Create a mounting point
sudo mkdir /mnt/root
3. ls /dev/mapper
In this example the output would have shown "nvidia_cffbdeda, nvidia_cffbdeda1, nvidia_cffbdeda2" where nvidia_cffbdeda is the hdd. All the others listing a # on the end are the partitions. If you don't know what partition is the root of your installation check out gparted. I will use nvidia_cffbdeda1 in the following steps as an example for mounting and chrooting into the installation.
4. Mount the installation
sudo mount /dev/mapper/nvidia_cffbdeda1 /mnt/root
*If this fails use nautilus (thunar in xbuntu) to mount your Ubuntu root partition then use mount to find the mount location. This location will be used in place of /mnt/root in the following steps.
sudo mount --bind /dev /mnt/root/dev
sudo mount -t proc proc /mnt/root/proc
sudo mount -t sysfs sys /mnt/root/sys
sudo mount -t devpts devpts /mnt/root/dev/pts
sudo cp /etc/resolv.conf /mnt/root/etc/resolv.conf
5. Login into the installation
sudo chroot /mnt/root /bin/bash
6.Fetch most recent package lists
apt-get update
7. Remove GRUB2
apt-get purge grub2 grub-pc
rm -r /boot/grub
##The system will be unbootable until another bootloader is installed.
8. Install GRUB 0.97
apt-get install grub
grub-install /dev/mapper/xxx ##note please substitute your hdd in this line (mine would have been nvidia_cffbdeda)
9. At this point it may be a good idea to check the device.map
chmod 777 /boot/grub/device.map##For write access
nano /boot/grub/device.map
Mine was incorrect and I changed it to:
(fd0) /dev/fd0
(hd0) /dev/mapper/nvidia_cffbdeda ##was listed as /dev/sda which is incorrect
(hd1) /dev/sdc
Afterwards use this to restore file permissions
chmod 744 /boot/grub/device.map
If changes were made then re-run grub-install
10. grub --no-curses ##you will now be at the grub prompt##
grub> device (hdx) /dev/mapper/xxx ##note please substitute your hdd in this line
grub> find /boot/grub/stage1 ##make a note of the output it is used in the next step
grub> root (hdx,y) ##(hdx,y) where x is the drive (most likely 0) and y is the partition (first partition would be 0 NOT 1)
setup (hdx)
quit
update-grub
##When prompted to generate a menu.lst file say yes
13. Run these commands to keep it from upgrading automatically:
echo "grub hold" | sudo dpkg --set-selections
echo "grub-common hold" | sudo dpkg --set-selections
14. Reboot
As much as I have tried to make this guide complete it seems to not work for some people and anyhelp I can get in making this guide complete is much appreciated. Namely Raid 1 issues.
Step 10 problems arise when you don't specify the correct device for (hd0)
BIOS boot order can also affect this step so make sure it's correct
In some extreme cases it's necessary to remove other hard drives from the sys as some cheap motherboards lack the understanding of fakeraid and tell grub IDE devices boot first. Thus effectively installing grub to the wrong disk in some cases.
=======================
Install with this tuto by cedric.driard
https://help.ubuntu.com/community/Fa...20installer%29
MAKE SURE YOU BACK UP ANYTHING OF IMPORTANCE!!!
This Section shows you how to install Ubuntu using the Ubiquity graphical installer found on the Live CD.

  1. Modify the bios to boot on the Live CD
  2. Begin the install process
    • creat the raid partition for ubuntu.
    • On the last step before installing, click the Advanced options and uncheck the install boot loader option. We will install grub (the boot loader later).
    • After installer finishes, close ubiquity installer and reboot the machine.
  3. Start on the Live CD where you choose use Ubuntu without any change
  4. Open a terminal
  5. Now check that you can view the partitions in the raid array with this command
    1. $ ls -l /dev/mapper/
      • OUTPUT: control isw_beeaakeeaa_fivewe will be using the array /dev/mapper/isw_beeaakeeaa_five in this example.
      • We used /dev/mapper/isw_beeaakeeaa_five5 partition as Ubuntu root partition in this example.
  6. Install dmraid and grub in your new Ubuntu installation:
    1. $ sudo mkdir /mnt/root
    2. $ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /mnt/root/
      • if this fails maybe the /target directory is already mounted if not then some debuging will be required.
    3. $ sudo mount --bind /dev /mnt/root/dev/
    4. $ sudo mount -t proc proc /mnt/root/proc/
    5. $ sudo mount -t sysfs sys /mnt/root/sys/
    6. $ sudo cp /etc/resolv.conf /mnt/root/etc/resolv.conf
    7. $ sudo chroot /mnt/root/
    8. # apt-get update
    9. # apt-get install -y dmraid
    10. # apt-get install -y grub
    11. # mkdir /boot/grub
    12. # cp /usr/lib/grub/i386-pc/* /boot/grub/
    13. # grub --no-curses you will now be at the grub prompt grub>
      1. grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five
      2. grub> find /boot/grub/stage1
        • OUTPUT: find /boot/grub/stage1
          (hd0,4)
        • make a note of the output from this command it will be needed later. in my case I have my linux partition as the first extended partition you most likely will have different results (remember that grub starts partition numbers in zero, so partition 5 for linux is partition 4 for grub).
      3. grub> root (hd'x','x')
        • replace 'x' with the partition number from the previous step
      4. Install grub on your disk (or partition if you prefer boot your computer with another boot manager)
        1. grub> setup (hd'x')
          • replace 'x' with the values gathered in the previous step
          or
          • grub> setup (hd'x','x') to install grub on the partition.
            YOU WILL NEED ANOTHER BOOT MANAGER TO START YOUR COMPUTER
      5. grub> quit
    14. # update-grub
      • say yes to creating a menu.lst
    15. now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano # nano /boot/grub/menu.lst
      1. Change
        • # groot=(hd0,0) TO # groot=(hd0,'x')
          root option in the boot entries to root (hd0,'x') Replace the 'x' with the partition that was found earlier
      2. Add the Windows boot entry if need be.
        title Windows
        rootnoverify (hd0,0) # use the correct partition for Windows, of course
        makeactive
        chainloader +1
      3. For all Ubuntu-related boot entries, such as
        title Ubuntu ...
        root (hd0,0)
        ...change (hd0,0) to (hd'x','x') (in my case, Linux partition was not the first one, and without these changes I would get grub "Error 17" after reboot). You can use the uuid of the mapped raid partition in a grub menu.lst uuid field instead of the root (hd'x','x') field; look in /dev/disk/by-uuid with 'ls -l'.
      4. Save and exit nano. or what ever text editor you are using.
    16. # update-grub
  7. make sure the new install of Ubuntu loads the raid module kernel
    1. # echo dm-raid4-5 >> /etc/initramfs-tools/modules
    2. # update-initramfs -u
    3. # nano /etc/modules
      • and add 'dm-raid4-5' if not exists
  8. Reboot
  9. Modify the bios to boot on your HDD
  10. Start and verify both Ubuntu and the existing Windows partition boot if Windows is installed.

=======================
I have successfully installed Ubuntu x64 9.10 (Karmic Koala) on a fakeraid 1 (mirror) volume following this thread. Thank you very much for this clear and easy How-to.
Despite of this, I have some comments to do:
Introduction: use gparted to create the partitions on your fakeraid volume (I've used ext4); run the installation; on the advanced options select "No grub installation"; after installation you can begin the process.
1. No comments.
2. No comments.
3. No comments.
4. No comments.
5. No comments.
6. No comments.
7. No comments.
8. After installing legacy GRUB 0.97, you will need to copy the stage files to the /boot/grub directory. If you do not, point 10 will fail. Thus,
apt-get install grub
cp /usr/lib/grub{/architecture}/stage1 /boot/grub
cp /usr/lib/grub/{architecture}/stage2 /boot/grub
cp /usr/lib/grub/{architecture}/{partition_type}_stage1_5 /boot/grub

9. Check /boot/grub/device.map. The file permissions should be 644.
grub-install /dev/mapper/{fakeraid_volume}
10. Don't know why, but I had to manually edit /boot/grub/menu.lst to point correctly to the booting partition.
13. Here "sudo" is not needed.
echo "grub hold" | dpkg --set-selections
echo "grub-common hold" | dpkg --set-selections

14. No comments.
------------------------
Worked for me (mb = xfx sli 750a, fakeraid 1)
- assumes you configure an internet link off your live cd/usb
1) Create RAID array via BIOS (I've only tested this with RAID-1 but RAID-0 should also work)
2) Boot the live 9.10 CD
3) Terminal -> 'sudo dmraid -r' and 'sudo dmraid -s' both report the mirror looks OK.
4) Run through installer, installed OS onto RAID-1 array
- manually created 2 partitions, swap and /
- unchecked the install boot loader via advanced options on the last screen
5) Mount your install and login,
Terminal,
sudo mkdir /mnt/root
ls /dev/mapper

In this example the output would have shown "nvidia_cffbdeda, nvidia_cffbdeda1, nvidia_cffbdeda2" where nvidia_cffbdeda is the hdd. All the others listing a # on the end are the partitions. If you don't know what partition is the root of your installation check out gparted. I will use nvidia_cffbdeda1 in the following steps as an example for mounting and chrooting into the installation.
sudo mount /dev/mapper/nvidia_cffbdeda1 /mnt/root
*If this fails use nautilus (thunar in xbuntu) to mount your Ubuntu root partition then use mount to find the mount location. This location will be used in place of /mnt/root in the following steps.
sudo mount --bind /dev /mnt/root/dev
sudo mount -t proc proc /mnt/root/proc
sudo mount -t sysfs sys /mnt/root/sys
sudo mount -t devpts devpts /mnt/root/dev/pts
sudo cp /etc/resolv.conf /mnt/root/etc/resolv.conf
sudo chroot /mnt/root /bin/bash
6) Install Grub2 from Lucid
apt-get purge grub2 grub-pc
apt-get update
apt-get dist-upgrade
mv /etc/apt/sources.list /etc/apt/sources.bak
echo deb http://archive.ubuntu.com/ubuntu lucid main
greatherthensymbolhere /etc/apt/sources.list
apt-get update
apt-get install grub-common
apt-get install grub-pc

- select default options, pick your RAID array for the boot device in the last screen of the setup
upgrade-from-grub-legacy
7) Confirm grub version...
grub-install -v
(should report back 1.98)
8) Hold packages
echo "grub-common hold" | debconf-set-selections
echo "grub-pc hold" | debconf-set-selections

9) Restore sources.list
mv /etc/apt/sources.list.bak /etc/apt/sources
apt-get update

10) Reboot

Nice to know this is/will be worked out for 10.04.
------------------------
Everything worked GREAT on my ASRock ION 330 HT-BD with just following two changes / corrections:
8. Hold packages
echo "grub-common hold" | dpkg --set-selections
echo "grub-pc hold" | dpkg --set-selections
9) Restore sources.list
mv /etc/apt/sources.bak /etc/apt/sources.list
apt-get update
------------------------
Code:
sudo update-grub
While will create the menu.list

Also you need to run:
Code:
grub-install /dev/mapper/nvidia_dhfedfae5
Which looks like it will fail, but will generate the device.map for you to edit.
updated my device.map to be the follwing configuration:
Code:
root@ubuntu:/boot/grub# cat device.map
(fd0) /dev/fd0
(hd0) /dev/mapper/nvidia_dhfedfae #was /dev/sda
(hd1) /dev/sdb
Which looks to be correct.
If I attemt to run grub-install, I get:
Code:
/boot/grub# sudo grub-install /dev/mapper/nvidia_dhfedfae
/dev/mapper/nvidia_dhfedfae does not have any corresponding BIOS drive.
  went back to the original FakeRaidHowTo guide
And realised you could NOT do a grub-install. So instead, copied over the files from cp /usr/lib/grub/{your-cpu-arch}-pc/
From there I could run through the grub console section perfectly.
The only change I needed to make was in my menu.lst, it had set up Ubuntu under (hd0,0), when in fact, it is (hd0,4). Easy enough to fix.
----------------------------------
Pretty hacker workaround
-I ran the Ubuntu Alternate installer (regular one doesn't work with my video card)
-Got to the point where it drops out of the install due to grub2 install failure.
-Went thru steps in post one, but as installer is running, chrooting to /target
-moved my /etc/apt/sources.list to /etc/apt/sources.bak
-created new sources.list with
deb http://cz.archive.ubuntu.com/ubuntu lucid main
-apt-get update
-apt-get install grub-pc

Worked like a charm, I was able to select my nvidia raid instance instead of /dev/sd0 /dev/sd1. Secret is grub2 that comes with 9.10 is 1.97beta4 or something, lucid had 1.98 stable =)
----------------------------------
I've read somewhere that the ICH10R chipset and its built-in raid is somewhat flaky in linux. Not sure why it had worked in 9.04 but not 9.10 in your case. I'm gonna take a wild guess here but I would like to believe dmraid can't make sense out of the metadata defining your array. The only way to prove that would be start the array from scratch. I'm sure you dont want to backup all your data and try that just to get linux, I don't blame you. Maybe wait a lil while longer for 10.04 and see if that works for you. It may also be that the command used for device is not english on your sys try typing help at the GRUB CMD line.
-----------------------------------
SOLVED! Use cedric.driard instructions in post #40 instead of post #1.
http://ubuntuforums.org/showpost.php...2&postcount=40
Just skip part 7 if you are on 10.04 A2.
And also Run these commands to keep it from upgrading automatically:
echo "grub hold" | sudo dpkg --set-selections
echo "grub-common hold" | sudo dpkg --set-selections
-----------------------------------
Grub v1.98 has been released for ubuntu 10.04 - it fixes various RAID issues.
burg is another possibilty
for a quick chat on burg and RAID
http://ubuntuforums.org/showthread.php?t=1378951
and burg in general
http://ubuntuforums.org/showthread.php?t=1195275 Section 8
or http://ubuntuforums.org/showthread.php?t=1371288
=====================
If windows doesn't boot, try to make a fixmbr (I do it many times during trying install Ubuntu in fakeraid and it worked all the time and take 5 minutes)
Boot on windows CD
choice installation
F6 to install raid driver
choice R for repair
at the terminal
choice your HDD where is windows
write : fixmbr
write a new mbr, say yes
======================
I executed the following with no apparent problem:
# grub --no-curses
1. jon grub  shell:
device (hd0) /dev/mapper/{my-raid-device-root-partition}
--------------------------------------
Succesfull multiboot installation of 9.10 and windows 7 on a RAID 1. This after 3 days of installing all kind of combinations of installations of 9.4 CD, 9.4 alternate CD, 9.10 and 9.10 alternate and W7.
My procedure:
1. I have a MSI P45 Neo 3 MB with 2 harddisc
2. In the Bios I setup a fakeraid 1 for these 2 drives giving 40 GB of space.
3. I installed W7 in a 20 GB partition and after several reboots checked that it was working OK
4. I started the Ubuntu 9.10 Desktop version as a life CD, This CD was downloaded today.
5. On the desktop I started the icoon Install Ubuntu
6. In the partitioning windows I specified Manual
  In the Freespace under the line /dev/mapper/isw.... I added
  15 GB Ext4 mountpoint /
   4 GB swap Note that /dev/mapeer/isw.. is show automatically, eg the raid 1 disk is recognized and treated properly in the installer
7. I complete the installation of 9.10
8. After the reboot Grub (and not Grub2) presented itself without W7
9.  In a Terminal sudo update-grub made no difference, file /boot/grub/menu/lst was not changed.
10. In a Terminal sudo gedit. With File, Open I went to map Filesystem/boot/grub.
      I opened menu.lst, copied from examples the # lines for windows to the end of the file -1 line, removed the # and filled in the partition number so :
title Windows 95/98/NT/2000
root (hd0,2)
makeactive
chainloader +1
### END DEBIAN AUTOMAGIC KERNELS LIST


Note that the partition number must be the 100 MB partition not the W7 installation partition

11. After saving and reboot I can now start or Ubuntu of W7