Tag: partition

RAID1By Robert Camilleri

We start by listing the partition tables present on the server to locate the new hard disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdc doesn’t contain a valid partition table

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

The above output shows that there are two hard disks (hda and hdc). Partitions are visible on hda however hdc does not contain a valid partition table. In fact this is the replacement for the faulty disk.

To view the health of the Software RAID type cat /proc/mdstat

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hda1[1]

104320 blocks [2/1] [_U]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

Note that [2/1] shows that there are 2 disks in the array however only 1 is active. The symbols [_U] mean that one of the two disks is missing from the array and must be reconfigured.

Since the new disk is /dev/hdc we need create the partitions required for the RAID. Use fdisk to create the boot partition on the new disk.

[root@mail ~]# fdisk /dev/hdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-60801, default 60801): +100M

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 83 Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS /.
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext’d (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Command (m for help):w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@mail ~]#

Type fdisk -l to verify creation of partition on the second disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Software RAID requires disks in the array to be partitioned identically. You can try to do this manually calculating the exact number of cylinders required for each partition to match their counterparts on the other disk. This is highly discouraged. Instead we use the sfdisk command.

[root@mail ~]# sfdisk -d /dev/hda

# partition table of /dev/hda

unit: sectors

/dev/hda1: start= 63, 208782, Id=fd
/dev/hda2: start= 208845, Id=fd
/dev/hda3: start=102607155, 6136830, Id=fd
/dev/hda4: start=108743985, Id=fd
[root@mail ~]#

The output above displays the partition sizes on the primary disk

In order to create identical partitions on the secondary disk we type the following

[root@mail ~]# sfdisk -d /dev/hda | sfdisk /dev/hdc

Checking that no-one is using this disk right now... 

OK

Disk /dev/hdc: 60801 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdc1 0+ 12 13- 104391 fd Linux raid autodetect
/dev/hdc2 0 – 0 0 0 Empty
/dev/hdc3 0 – 0 0 0 Empty
/dev/hdc4 0 – 0 0 0 Empty
New situation:
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/hdc1 63 208844 208782 fd Linux raid autodetect
/dev/hdc2 208845 102607154 102398310 fd Linux raid autodetect
/dev/hdc3 102607155 108743984 6136830 fd Linux raid autodetect
/dev/hdc4 108743985 976768064 868024080 fd Linux raid autodetect
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table…

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
[root@mail ~]#

Typing fdisk -l once again displays that the partitions on both disks are in fact identical

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect
/dev/hdc2 14 6387 51199155 fd Linux raid autodetect
/dev/hdc3 6388 6769 3068415 fd Linux raid autodetect
/dev/hdc4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Now that the partitions are identical we can re-sync the information across the RAID configuration

Type mdadm -a /dev/md0 /dev/hdc1 to add /dev/hdc1 partition to the /dev/md0 RAID partition.

[root@mail ~]# mdadm -a /dev/md0 /dev/hdc1

mdadm: added /dev/hdc1

[root@mail ~]#

Type cat /proc/mdstat to view the re-syncing process

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[2] hda1[1]

104320 blocks [2/1] [_U]

[=>... ] recovery = 7.8% (8512/104320) finish=0.7min speed=2128K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]# cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 hdc1[2] hda1[1]
104320 blocks [2/1] [_U]
[=======>... ] recovery = 37.2% (39808/104320) finish=0.5min speed=1809K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:

The below shows how the output should be when the re-syncing process has ended. Note the “[UU]“. This confirms that both disks are active.

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

The same process has to be performed on the other partitions

[root@mail ~]# mdadm -a /dev/md1 /dev/hdc2

mdadm: added /dev/hdc2

[root@mail ~]# mdadm -a /dev/md2 /dev/hdc3

mdadm: added /dev/hdc3

[root@mail ~]# mdadm -a /dev/md3 /dev/hdc4

mdadm: added /dev/hdc4

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hdc3[2] hda3[1]
3068288 blocks [2/1] [_U]
resync=DELAYED

md3: active raid1 hdc4[2] hda4[1]
434011968 blocks [2/1] [_U]
resync=DELAYED

md1: active raid1 hdc2[2] hda2[1]
51199040 blocks [2/1] [_U]
[>... ] recovery = 0.0% (37376/51199040) finish=501.5min speed=1698K/sec

unused devices:
[root@mail ~]#

Finally we need to install GRUB on the second disk’s MBR.

[root@mail ~]# grub
GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]

grub> find /grub/grub.conf
(hd0,0)
(hd1,0)

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if “/boot/grub/stage1″ exists… no
Checking if “/grub/stage1″ exists… yes
Checking if “/grub/stage2″ exists… yes
Checking if “/grub/e2fs_stage1_5″ exists… yes
Running “embed /grub/e2fs_stage1_5 (hd1)”… 15 sectors are embedded.
succeeded
Running “install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf”… succeeded
Done.

grub> quit

Tags: , , , , ,

By Emma Rosenberg

Linux Mint

In this tutorial, the reader will learn how to install the Linux Mint 12 KDE on a btrfs file KDE logosystem. The B-tree File system (abbreviated to acronym Btrfs) has not matured far enough to be used as a default file system on Linux machines. Fortunately, those who choose to run Linux with btrfs do have options on installing useful components such as the highly coveted Linux Mint 12 KDE. For those who are not familiar, Linux Mint 12 KDE is a linux distribution based on the Ubuntu desktop operating system, and is gaining massive popularity in the past couple of months in the world of the low cost dedicated server running Linux. Due to popular demand, this tutorial will teach how to precisely install Linux Mint KDE on a btrfs file system.

Before we proceed, do keep in mind that this tutorial is optimized for the current version of Linux Mint made available on their main website on January 11,2012, which is still a release candidate. Regardless, the stable version will likely have an identical installation process as the current release candidate, so it should not affect the validity of this article.

Installing a Linux distribution on a btrfs file system will require three partitions. The first partition is a boot partition, which is mounted at the /boot. The second partition is the root partition, which is mounted at /. The last partition is for the Swap partition, which provides disk space that the system will use as virtual memory.

In order to setup these partitions, download the installation file for the distribution from the Linux Mint download page. Stick the downloaded package onto either a DVD or a USB stick, and boot the computer accordingly.

After the computer has booted, the Linux Mint 12 KDE installation should be on your desktop. Click on the “Install Linux Mint” icon on the desktop. Click the Continue button to proceed onto the next step. Two disk partitioning options are available, default and manual. Make sure you use Manual, so that we can install it on a Btrfs file system.

Selecting Manual will pull up the advanced disk partitioning tool. Make sure the target disk has been initialized before you create the partitions. Select the appropriate disk and click on the New Partition Table button. There will now be a free space option on your menu. Select the free space, and then click on the Add button so that the first partition can be created.

The first partition will be mounted at /boot. Make sure it is a Primary partition out of the two options. A disk space of 500 MB should be plenty for this partition, so go ahead and put 500 MB. Even though we are installing on a Btrfs file system, make the boot partition as a Ext4 file system. It will still work properly.

Now that the boot partition has been created, select the remaining free space and once again, press the Add button to create the next partition. This time this partition is for /, which is the main file system. Instead of choosing Primary, choose Logical. The majority of the remaining disk space can be put on this file system, leaving only 4 GB for the last partition. Then, make sure the btrfs journaling file system option is chosen for this partition. Mount point will be set as /. Press ok, and the second partition is finished.

Lastly, choose the remaining free space and press Add button. Depending on the disk space, allocate 2 to 4 GB for the Swap partition. Make the partition type Logical. Finally, use the partition as swap area under the Use as drop down menu. Press ok, and the third and last partition is created.

Double check that all three of these partitions were created properly. If the list checks out, click on Install Now. Congratulations, you have now installed Linux Mint 12 KDE using the Btrfs file system!

Learn more about free and popular Linux distributions to use on your low cost dedicated server.

Tags: , , , , ,

By Mario Pesce

Introduction

When a few years ago I decided to move from Windows to Linux (I created on my machine separate partitions for Linux and booted from Lilo or Grub either into Windows or into Linux, according to job requirements.

I normally used my laptop PC during the day in a company that had a Windows based LAN and therefore I normally had to boot in Windows during the day whereas I would boot into either Windows or Linux at home. This approach has a few disadvantages as follows:

  • My work e-mails were in Microsoft Outlook and I had to boot under Windows to access them.
    I used KMail (and later Mozilla Thundirbird) for my personal e-mails and I had to boot under Linux to access them.
  • I could access Window folders from Linux and copy data, but I could not access any of the Linux folders from Windows.

I concluded that there should have been a better way to use my PC and I looked for a solution to access both Linux and Windows applications without rebooting.

I investigated some of the available products. I found that the wine or CodeWeavers Crossover supported most common Microsoft Windows applications, but some other ones would not work. VMWare looked interesting, but finally I decided to buy Win4Lin (originally developed by Netraverse to support only Windows 95, 98 or ME, even if it allowed to install and use many more recent applications such as Office 2000 or other ones developed for XP without a glitch.

Some good advantages that I found in Win4Lin are the following:

  • Win4Lin has a very small overhead and pretty good performance. I discovered, after the installation, that sometimes applications run faster under Win4Lin than in the original Windows environment. The performance is due to the fact that Win4Lin is not really an emulator; it creates an environment where Windows applications run in native mode. This is done by providing modules that allow Windows to run as a Linux process.
  • The installation of Win4Lin is pretty straightforward.

Recently I had to install Linux on a new machine and I decided to install both a new OpenSUSE 11.0 distribution and the new version of Win4LinPro that now supports Windows 2000 and XP (according to the company Vista should also be supported in future).

The objective of this report is to give you an overview of the new Win4LinPro application and of the approach that I followed to migrate my dual boot machine to a single boot system.

Installing Win4LinPro

Win4LinPro is now distributed and supported by Virtual Bridges. You can easily order it online at the Win4Lin.com site and download either an ISO version or one of the Debian or RPM packages. Virtual Bridges confirms the order with an e-mail which includes also the licence code that must be entered during the installation.

Since I had an RPM based Linux distribution (OpenSuSE 11.0), I downloaded the RPM package. I checked the instructions of the UserManual which require to pre-install also the gcc and the kernel-source packages and then I could install the RPM without any problems.

The installation procedure of the original Win4Lin was more complex because it required to download a special Netraverse-enabled kernel according to each distribution. The new installer does not require this step because it automatically compiles and installs the kernel modules needed to support Win4LinPro.

The Windows installation has also become simpler. The original product required to copy files from your Windows 95, 98 or ME CD to disk and eventually install Windows. In the new version you can use the win4console command to request a Windows session installation and to define how it should be performed (installation directory, installation media etc.) You can specify that you want to install from the XP CD and the installation is performed as if it were a normal XP installation. The win4console allows also to install multiple copies of Windows and the system allows to run two of them concurrently (this could be useful if you want to have a Windows XP and a Windows 2000 session).

After the installation is complete, if you have used the defaults, you will find a Windows icon on your desktop and you can use it to start or shut-down your Windows session terminal. Alternatively you can use the win4 shell command.

You can install new applications in Windows in the same way as you would do with a normal Windows system. I installed various applications such as Microsoft Office, Acrobat Reader, Eudora, HotMetal PRO and a new version of Internet Explorer without any problem.

I had some problems with the original installation to use a COM device for a dial up connection. The new version allows Windows to connect to almost any type of Ethernet network from regular Internet access to Active Directory authentication, and anything in between.

Using Win4LinPro

Win4LinPro creates an interesting Windows environment which is pretty well integrated with Linux.

The personal Windows environment is normally created by win4LinPro in the home directory of the user who performs the installation. When the installation is complete, you will find two image files with the .IMG suffix which are used by Windows as the C: drive (used to store Windows programs and data) and the D: drive (used to store user settings).

By default Win4LinPro automatically configures shared folders so that Windows can access Linux files and Linux can access Windows files. Your Linux home directory is accessible from the Windows HOSTHOME path. You can also use the shared documents directory from Windows by double clicking on the Windows My Documents icon and accessing the path HOSTDocuments.

The Win4LinPro environment is surely much better integrated with Linux than a native Windows installation and you will have at your disposal the power of Linux and Windows applications without any need to reboot.

Moreover Win4LinPro offers greater virus protection than a stand-alone Windows installation. You can easily save your Windows directory as a tar archive and many viruses will not have any effect as explained below:

  • Boot sector or other boot time viruses. There is no Windows boot sector and therefore they are ineffective.
  • FAT32, VFAT or NTFS related viruses. Win4Lin installs Windows files in subdirectories of the Linux filesystem and therefore these viruses are ineffective.
  • Executable files viruses. These can still attack, but will not affect the Linux system.
  • Macro viruses. These can still attack Windows macros, but you can use Linux permissions to make them write protected.

Another protection is given by the snapshot running mode which insures that data in the C: virtual drive cannot be changed

Win4Lin Limitations and Peculiarities. Following main points should be considered:

    • Win4Lin offers different networking options that you can choose during installation and modify later (if needed). The basic TCP/IP and UDP/IP networking is the most secure and provides the best use of resources. If you need more advanced networking options you can use the NAT neworking or the Bridged networking options well explained in the UserManual.
    • Win4LIN does not support direct Windows access to USB devices. However, if they are configured in Linux, they can be accessed indirectly (You can use the My Host Computer function from the start menu to access devices mounted automatically by Linux)

.

Removing the original Window partition

One negative point of having both an original Windows partition and the Win4Lin installation is the waste of space (for instance I had MS Office applications installed on both partitions). This setup could offer better security, in case of problems to either the Windows or Linux installation, but, at some point, I decided that I could use better the disk space and work without double booting with Linux and Windows under Win4LinPro.

To avoid loosing useful data, I performed following activities:

  • I identified the Outlook mail boxes by using the Windows Find option with “*.pst” and copied them to the Win4LinPro environment.
  • I identified the Outlook Express maild boxes by using the Windows Find option with “*.dbx” and copied them to the Win4LinPro environment.
  • I identified my Eudora mail boxes (used for my personal mail) by using the Windows Find option with “*.mbx” and copied them to the Win4LinPro environment.
  • I found the ‘Favorites’ folders used by Internet Explorer and I copied it and its sub-folders to the Win4LinPro environment.
  • I copied the ‘My Documents’ folder and all other folders that I used in my Windows environment

Making the above copies in the Win4LinPro environment is relatively easy, because Win4LinPro can access mnt directly. You can mount the original Windows partition in the Linux /mnt directory by using a command such as:

$sudo mount /dev/sdb3 /media/windows -t vfat -o umask=000

Once the partition is mounted, you can access it in the Win4LinPro Windows session in the mnt Windows folder.

Once I was satisfied that all important data existed in the Win4LinPro environment, I decided to reformat the Windows partition and copy my Linux /home directory, that was included in the main root hierarchy, to a separate partition. This activity is described in detail below.

Using the freed partition for Linux

A good description of how to move /home to a different partition can be found in a good tutorial by Daniel Robbins at IBM DeveloperWorks. The main steps are as following:

  • Create a filesystem in the new partition by using a command such as mkfs /dev/???
  • Mount the new filesystem in /mnt with a command such as mount /dev/??? /mnt/newhome
  • Drop to single user mode (init 1)
  • Change to the current home directory and enter a copy command such as cp -ax * /mnt/newhome. The ax option causes cp to copy in recursive mode by preserving all file attributes.
  • Rename the old /home to /home.old by using the command mv /home /home.old and mount the new one with mount /dev/??? /home.

When you are sure that everything works correctly, you can remove the /home.old directory.

Conclusions

I believe that the approach described above allows an optimal use of both Linux and Windows resources.

It is often difficult to use only Linux, because one normally has to work in Windows based LANs, interact with other Windows or Linux users or just because one is too lazy to learn new applications instead of those normally used in a Windows environment.

A double boot system is a inconvenient to use. The solution proposed above allows a much better usage of the computer resources and time.

Mario Pesce – Computer consultant

email: mario@datamission.co.uk

blog: http://mariopesceuk.blogspot.com/

Tags: , , , ,

Understanding Linux Partition Types & Linux Hard Disk Partitioning – System Admin Training

By Clyde E. Boom

When you’re doing Linux disk partitioning (during or after installing Linux) you will likely run into situations where you can’t create partitions – and can’t do other tasks that you’d like to do with partitions!

This is when you need to understand the Linux hard disk partitioning “rules” described below.

Linux System Admin Training Tips: Keep in mind that the “rules” below apply to using the Linux fdisk command, which is the most commonly used disk partitioning utility. You may be able to “break” these rules with other hard disk partitioning utilities.

“Setting Up” Linux Hard Disk Partitions

You can “set up” and configure your Linux partitions while using the installation routine of most Linux distributions – and also by using the Linux fdisk and parted commands – and some other partitioning commands.

Also, as a Linux System Administrator, you will also need to manage (create, delete, and modify) partitions on existing Linux systems (after the OS has been installed). To do this, you use the fdisk command / utility or the parted command / utility – and there are also other disk partitioning commands and utilities.

There are several Linux hard disk partition “types”, such as primary, extended and logical – and there are also strict “rules” about using these Linux partition types.

Linux Primary Partitions

The disk partitioning utility in a Linux installation routine and the fdisk command (and other disk partitioning commands) can create a maximum of four Primary partitions per hard disk drive.

If you need more than four hard disk partitions, you need to create at least one Extended partition and then create one or more Logical partitions in the Extended partition.

To be able to create an Extended partition on a hard disk that already has four Primary partitions, you need to delete one of the primary Partitions and then create the Extended partition. So, you can have a maximum of three Primary partitions if you are creating an Extended partition on a Linux hard disk.

Linux Extended Partitions

A Linux hard disk must have at least one Primary partition before it can have an Exteneded partition.

fdisk cannot create more than one Extended partition per drive. To be able to use the disk space in an Extended partition, it must have at least one Logical partition (within the Extended partition).

Linux Logical Partitions

Extended partitions contain one or more Logical partitions. An Extended partition is not accessed directly. It is accessed via one or more Logical partitions within the Extended partition. If a hard disk has an Extended partition, then it has at least one Logical partition in that partition.

Partition Numbering

The maximum number of Primary partitions that fdisk can create is four and the maximum number of Extended partitions that it can create is one.

Remember, you must have at least one Primary partition before you can have an Extended partition. You can only have one Extended partition and the maximum number of the combination of Primary and Extended partitions is four.

The Linux disk partitioning concepts covered here apply to: Debian, Red Hat, Fedora, Ubuntu, Slackware, SUSE, openSUSE – and ALL other Linux distributions.

By the way…do you want to learn exactly how to use Linux and run Linux commands for Linux System Administration and get real, practical Linux training experience by running hundreds of examples of Linux commands?

Just click to download my free new Linux commands training course book and Linux audio podcast (.mp3) files here: Linux Commands Training Mini-Course

Clyde Boom says “Learn how to use Linux commands with easy, self-paced Linux training materials that show you how to run hundreds of examples of the essential Linux System Administration commands – and get that new and better job, promotion, raise – or keep your current job!”

You can get your instant access to my free Linux commands training course at: http://www.LinuxCommandsTrainingCourse.com

Tags: ,

Linux Training – Installing Linux on a Windows System
By Clyde E. Boom

The best way to get Linux training and Linux administration experience is to start by getting, installing and running Linux on a system. This allows you to actually work with Linux to run programs and learn Linux commands.

If you don’t want to buy a computer just for the purpose of running Linux, you can install Linux on your Windows system. You do this to create what is called a “dual boot” (Linux and Windows) system.

After you install Linux and boot your system, a menu appears allowing you to boot into Windows or boot into Linux!

7 Steps to Install Linux on Windows and Create a Dual Boot System

1. Back up your Windows programs and data

If you make a mistake when you install Linux on Windows you can loose all your Windows programs and data! Also, if you install Linux and then remove it later, you may not be able to boot into Windows.

Some people have run dual boot Linux systems without losing programs and data, but it’s good to know this downside. It’s extra incentive to do a backup.

Doing a backup is like buying insurance. If you don’t need it, fine. But if you do, you’ll be very glad you took this extra step.

2. Get Linux on CD or DVD

Select a Linux distribution (a.k.a. distro) and either download it and burn it to disk or buy it and have it delivered.

Linux Tip: To get Linux delivered, just do an Internet search for “linux cd” and you can have it mailed to you anywhere in the world for a very small fee.

3. Create empty unpartitioned disk space for Linux

Make sure your system has enough empty unpartitioned disk space for Linux. This isn’t just free disk space, as seen from within Windows. This is empty disk space that isn’t seen from within Windows.

4. Document your Linux installation settings

During the Linux installation, you need to specify some system settings. These include the Linux software programs and desktop(s) you want installed, networking settings, and disk partition sizes.

5. Start the Linux installation routine

To start installing Linux, you need to shut down your system and boot it with Linux CD / DVD number 1.

Some systems are set up to automatically boot from a CD / DVD if there’s one in the drive, and some need to have a system setting made. On other systems, you may simply need to hold down a key, like the letter “c” to boot Linux from CD / DVD.

6. Follow the prompts to specify settings and create a user

Linux systems have users and these users have names. You log in with a user name and password to work on a Linux system.

You work as the user named “root” to do Linux system administration. The root user is always created automatically during the installation. However, for security reasons, you should never log in to a Linux desktop as the root user.

As the installation routine runs, you will be asked if you want to create users. Always create at least one “regular” (non- root) user and give this user a password.

7. Have fun!

The Linux operating system is an incredible phenomenon. By getting it, installing it, and running it, you can get tons of experience working with it. Get a mitt and get in the game!

And now I would like to offer you free access to my Linux Commands Training Mini-Course, a 7 Lesson, Daily Mini-Course, including the free Linux Commands ebook and Linux audio podcasts – showing you how to get started learning how to use Linux commands.

You can get your instant access at: http://www.LinuxCommandsTrainingCourse.com

From Clyde Boom – The Easy Linux Training Guy – Easy, self-paced Linux training – In Plain English!

Tags: , , ,

Beginners Under Gnu – Linux? There Are Five Errors to Be Avoided
By Didier Pradel

To give the desire for testing linux so that it is one day your operating system, is one of the objectives of this site. The new users of GNU/Linux often make the same errors when they test GNU/Linux for the first time. The reasons of these errors are numerous: because GNU/Linux is a different OS; because Windows gives bad habits; because the user chooses the bad distribution and much of other possibilities. Here some solutions with five current problems under GNU/Linux.

1- To choose its distribution:

There is much opinion on the GNU/Linux distribution with which you will have to start, and the majority are not relevant.

After having to seek, to study, read the opinions of users, with the wire of time, on many distributions, two points arise:

the first: GNU/Linux Bureau is a question of taste,

the second: not a distribution does not join together the whole of the best options.

For start with GNU/Linux, it is to advise to choose among the following distributions, without small-sol-figure02-icon-montageorder:

Professional SUSE and, in the future, openSUSE

Linspire Xandros

Fedora Core

Mandriva (in the past Mandrake)

Ubuntu

2- Is Linux free?

Some claim that all that is related to Linux is free. A good software deserves that one pays for him it is obvious, but the price must be reasonable the majority of the commercial distributions GNU/Linux for the office costs less than $100 and is really very rich. The term distribution meaning that a great number of software are gathered they also contain thousands of applications for the office. The commercial distributions GNU/Linux include word processing softwares, P2P, spreadsheet, presentation on transparency, edition file sharing of video, binary compatibility with Windows, virtual machine, reading of DVD, Web server, Web navigator, and much of others.

3- The partitions:

With Windows, you are accustomed to only one partition on your hard disk. It contains the operating system, the applications, the data, and a great space for your file of Windows exchange (the software uses space on the hard disk when the read-write memory is not enough any more). GNU/Linux functions differently. In order to obtain the best performances of the system, the file of exchange is on a separate partition. If you have 512 MB or 1GB of read-write memory the size the partition of exchange (swap) should not be lower than 512 MB, and not lower than 1GB if you have less than 512 MB of read-write memory.

It is useless to make a larger partition if you use your machine only for office automation applications. With this solution you can safeguard the remainder of your personal and software data on a second partition. It is a good solution if you never change hard disk or operating system. But if you wish to preserve your data and the preferences of the applications which you use, it is to better do two other partitions for the operating system, the other for your data and your adjustments. that thus gives 1 partition root “/”, 2 partition “/home”. 3 swap the size depends on the number of software which you install, but 20 GB are more than sufficient for the partition root “/”root, the largest part of your disc must be to hold has” /home “, because it is there that you will store images, films, and other large files. It is wise to give 75% of the total disk space to the repertory /home, the majority of the GNU/Linux distributions can make the partitions for you, but they have all various ideas on the number of partitions to create and their size. you must decide if you want to change the default values. You can preserve your Windows partition and thanks to the dual-boot to choose to start your computer either under Windows or under GNU/Linux. You must install Windows in first to make only one partition but not too large not to obstruct the installation of GNU/Linux after. And if you want to exchange files between the Windows partition and the GNU/Linux partition, use the filing system FAT32 to format your Windows partition (Window does not read the partition linux and linux does not read partitions NTFS whereas it can read and write easily on a system FAT32).

4- The Permissions:

With Windows, you are in general either an administrator, or a user with the rights of administrator. With GNU/Linux, you are in general connect as a user to restricted access, and you pass as a root (i.e. administrator under Windows) when you must change important parameters of the system or regulate the hardware configuration or add or remove a program. This organization based on the permissions makes your system protected and one is accustomed quickly, although that is strange at the beginning.

5- To give up with the first problems:

GNU/linux is not Windows thus you enter a new world with new rules. To learn has to evolve/move in this new world will take time, it is normal. It will be necessary to learn from new software, a new interface, with a new manner of making. but once passed this stage hardest is made. The community the forums are sources of support as well as the site of your distribution if you chose a distribution commercial. To learn an operating system is a challenge. Essayer Linux is not in fact so hard and a thing is sure in any case: more you are frustrated with Windows and its problems, more the transition to GNU/Linux will be easy. Good luck! Those which want to install linux on a laptop will find here The linux laptop support a list of the laptop on which that was already done.

Didier Pradel is the webmaster of laptop support and The linux laptop support where you can find many useful informations, and help for your lovely laptop.

Tags: , , , , , , ,

Multi boot or Multi booting (usually dual booting, but many OSes can be booted from the same computer) is the act of installing multiple operating systems on a computer, and being able to choose which one to boot when switching on the computer power. The program which makes multi booting possible is called a boot loader.grub_with_ubuntu_and_windows_vista1

Multi booting is useful in many situations, such as those where several pieces of software require different operating systems and cannot be run on a single system. A multi boot configuration will allow a user to use all of this software on one computer. Another reason for setting up a multi boot system can be that one wants to investigate or test a new operating system without switching completely. Multi booting allows one to get to know the new system, configure all applications needed and migrate data before making the final step and removing the old operating system. This is often accomplished by using a boot loader that can boot more than one operating system, such as NTLDR, LILO, or GRUB.

Multi booting can also aid software developers where multiple operating systems are required for development or testing purposes. Having these systems on one machine can greatly reduce hardware costs. (However hardware costs are counterbalanced by system management costs, and the costs of the unavailability of the software that cannot be run at any given moment. Another solution to these problems is to use virtual machine software to emulate another computer from within the operating system of choice.)

A popular multi-boot configuration is a mixed-OS system in which Linux is one of the secondary (or primary) installations. In terms of business strategy, Windows does not facilitate or support multi-boot systems, other than allowing for partition-specific installations, and no choice of boot loader is offered. To deal with such installs requires consultation with Linux afficionados and techs, who are typically well-versed in the concept.

The basic concept involves partitioning a disk, to accommodate each planned installation, including separate partitions for data storage or backups. The partitions should be done with a Windows partitioning tool (diskpart, Disk Management), rather than a Linux tool (parted, QTparted), for the simple reason that Windows is more particular (cf. “picky”) about how the partition table is written and will occasionally complain or even show errors if its installed to a Linux-created (or sometimes modified) partition table. Linux tools are powerful, (ie. shrinking an NTFS drive) but Windows has particularities which must be considered. (See master boot record and extended boot record).

Windows should be installed to the first primary drive. Though Windows can be installed to another drive, certain particularities (drive letter assignments, expected system partition number) can make such installations problematic, while Linux installations on primary or logical drives have no such problems whatsoever.

The boot manager/loader should be installed by the Linux distribution. All Windows installations will be easily found by Linux, but Windows boot managers do not find Linux installations (nor does Windows deal natively with Linux file systems).

Get Linux Today!

Excellent resources below:

How to dual boot Windows XP and Linux (XP installed first) — the step-by-step guide with screenshots

Illustrated Dual Boot Site – Awesome site with all things Linux!

Tags: , , , , , , , , , ,
Back to top