NSLU2-Linux
view · edit · print · history

OpenSlug.InitialisingDisks History

Hide minor edits - Show changes to markup

October 19, 2008, at 12:47 PM by whyme -- added the swapon command to the initializing disks section as I just ran into this issue...
Added line 44:
  1. If necessary, use this swap space now: swapon /dev/sda2 (see Note below)
September 06, 2008, at 01:40 PM by cnczane -- Gratefully offering minor changes in the English.
Changed lines 3-5 from:

Before proceding with package installation you must connect an hard-disk where the root file system will be stored. A very good ideia is also to add some swap space.

to:

Before proceeding with package installation you must connect a hard disk where the root file system will be stored.

A very good idea is also to add some swap space.

Changed line 12 from:
  1. Run the fdisk command with the following syntax: fdisk /dev/sda. We're assuming that the disk is recognized as sda in this case. Note the device name has no number. We're refering to the entire disk, not specific partitions.
to:
  1. Run the fdisk command with the following syntax: fdisk /dev/sda. We're assuming that the disk is recognized as sda in this case. Note the device name has no number. We're referring to the entire disk, not specific partitions.
Changed lines 17-18 from:
  1. Create a new primary partition number 1. Fdisk will ask for the start cylinder (1) and the end cylinder (dependes of the disk size). I've choosed 3000M. This will create a 3GB sda1 partition.
  2. Create a new primary partition number 2. Fdisk will give the available first cylinder, just accept it, and choose a size o 768M. This will be our swap partition (Very, very large).
to:
  1. Create a new primary partition number 1. Fdisk will ask for the start cylinder (1) and the end cylinder (depending on the disk size). I've chosen 3000M. This will create a 3GB sda1 partition.
  2. Create a new primary partition number 2. Fdisk will give the available first cylinder, just accept it, and choose a size of 768M. This will be our swap partition (Very, very large).
Changed lines 44-45 from:
  1. Create the home file system: mkfs.ext3 /dev/sda3
to:
  1. Create the home file system: mkfs.ext3 /dev/sda3 [This will take longest.]
June 04, 2008, at 08:17 PM by Giovambattista Matera --
Deleted lines 79-88:

Huge Filesystem creation tip:

Adding swap space prior of large filesystem creation may avoid an "Out of memory" or crash due to great memory requirement of e2fsck:

Create swap space (mkswap ....), Add swap space line to /etc/fstab, Execute "swapon -a", Create remaining filesystems

June 04, 2008, at 08:12 PM by Giovambattista Matera --
Changed lines 82-83 from:
to:

June 04, 2008, at 08:12 PM by Giovambattista Matera --
Added line 83:
June 04, 2008, at 08:11 PM by Giovambattista Matera --
Changed lines 88-91 from:

1) Create swap space (mkswap ....) - 2) Add swap space line to /etc/fstab - 3) Execute "swapon -a" - 4) Create remaining filesystems

to:

Create swap space (mkswap ....), Add swap space line to /etc/fstab, Execute "swapon -a", Create remaining filesystems

June 04, 2008, at 08:09 PM by Giovambattista Matera --
Changed lines 89-91 from:

2) Add swap space line to /etc/fstab 3) Execute "swapon -a" 4) Create remaining filesystems

to:

- 2) Add swap space line to /etc/fstab - 3) Execute "swapon -a" - 4) Create remaining filesystems

June 04, 2008, at 08:07 PM by Giovambattista Matera --
Changed lines 86-91 from:

to great memory requirement of e2fsck.

to:

to great memory requirement of e2fsck:

1) Create swap space (mkswap ....) 2) Add swap space line to /etc/fstab 3) Execute "swapon -a" 4) Create remaining filesystems

June 04, 2008, at 08:03 PM by Giovambattista Matera -- Tip for large Filesystems creation
Changed lines 79-86 from:

Thats it. Now you can proceed installing packages do anything you want.

to:

Thats it. Now you can proceed installing packages do anything you want.

Huge Filesystem creation tip:

Adding swap space prior of large filesystem creation may avoid an "Out of memory" or crash due to great memory requirement of e2fsck.

December 27, 2007, at 09:21 AM by Dan Händevik --
Added line 44:
Changed lines 46-48 from:
Memory allocation failed while setting up superblock
->To fix this, wait to run the command until you have a running swap partition to handle the command.
to:

Memory allocation failed while setting up superblock
To fix this, wait to run the command until you have a running swap partition to handle the command.

December 27, 2007, at 09:20 AM by Dan Händevik --
Changed lines 44-47 from:

Note! If you have very large partitions the mkfx.ext3 command may result in the following error Memory allocation failed while setting up superblock To fix this, wait to run the command until you have a running swap partition to handle the command.

to:
Note! If you have very large partitions the mkfx.ext3 command may result in the following error
->Memory allocation failed while setting up superblock
->To fix this, wait to run the command until you have a running swap partition to handle the command.
December 27, 2007, at 09:17 AM by Dan Händevik --
Changed line 44 from:

''Note! If you have very large partitions the mkfx.ext3 command may result in the following error

to:

Note! If you have very large partitions the mkfx.ext3 command may result in the following error

Changed lines 46-47 from:

To fix this, wait to run the command until you have a running swap partition to handle the command.''

to:

To fix this, wait to run the command until you have a running swap partition to handle the command.

December 27, 2007, at 09:17 AM by Dan Händevik --
Changed line 44 from:

Note! If you have very large partitions the mkfx.ext3 command may result in the following error

to:

''Note! If you have very large partitions the mkfx.ext3 command may result in the following error

Changed lines 46-47 from:

To fix this, wait to run the command until you have a running swap partition to handle the command.

to:

To fix this, wait to run the command until you have a running swap partition to handle the command.''

December 27, 2007, at 09:16 AM by Dan Händevik --
Changed lines 44-47 from:
to:

Note! If you have very large partitions the mkfx.ext3 command may result in the following error Memory allocation failed while setting up superblock To fix this, wait to run the command until you have a running swap partition to handle the command.

October 04, 2007, at 04:53 AM by tim -- swapon /dev/sda2 isn\\\\\\\\
Changed lines 64-66 from:
to:

Note: There is no bug in 3.10. The slug is already swapping the directory. Execute the command: swapon -s to verify.

February 02, 2007, at 05:51 PM by JNC --
Changed line 62 from:
  1. It seems here is a bug in the 3.10 release that prevents the swapon command to successfully complete.
to:

It seems here is a bug in the 3.10 release that prevents the swapon command to successfully complete.

February 02, 2007, at 05:51 PM by JNC --
Changed line 62 from:

It seems here is a bug in the 3.10 release that prevents the swapon command to successfully compete.

to:
  1. It seems here is a bug in the 3.10 release that prevents the swapon command to successfully complete.
February 02, 2007, at 05:50 PM by JNC -- Bug in release 3.10
Added lines 61-64:

Note: It seems here is a bug in the 3.10 release that prevents the swapon command to successfully compete. All is fine in release 2.7.

December 19, 2006, at 02:58 AM by rwhitby -- Changed /opt to /home
Changed lines 43-44 from:
  1. Create the opt file system: mkfs.ext3 /dev/sda3
to:
  1. Create the home file system: mkfs.ext3 /dev/sda3
Changed lines 58-59 from:

Now all you need is to activate the swap partition and mounting automaticaly the /opt file system.

to:

Now all you need is to activate the swap partition and mounting automaticaly the /home file system.

Deleted line 60:
  1. Create on the root directory the /opt dir
Changed line 62 from:
  1. Add the following line at the end: /dev/sda3 /opt ext3 defaults 1 1
to:
  1. Add the following line at the end: /dev/sda3 /home ext3 defaults 1 1
August 02, 2006, at 06:00 PM by sunburnt -- note about having to umount /dev/sda1
Added line 40:
  1. You may have to unmount /dev/sda1 first: umount /dev/sda1
December 29, 2005, at 04:11 PM by admiraljkb -- added the line in fstab for the swap space to automatically load every boot
Changed line 49 from:

Execute the command turnup disk -i /dev/sda1

to:

Execute the command turnup disk -i /dev/sda1 -t ext3

Changed lines 63-65 from:
to:
  1. Add the following line at the end: /dev/sda2 swap swap defaults 0 0
December 17, 2005, at 02:32 PM by thx1011 -- typo
Changed lines 64-67 from:

Thas it. Now you can proceed installing packages do anything you want.

to:

One final reboot to see if everything is ok, and the mount command should report all the partitions created.

Thats it. Now you can proceed installing packages do anything you want.

December 17, 2005, at 02:30 PM by thx1011 -- Init of disks - First try.
Added lines 1-64:

Initializing Disks

Before proceding with package installation you must connect an hard-disk where the root file system will be stored. A very good ideia is also to add some swap space.

Creating partitions

Connect your hard disk to your USB port 1. Please make note that the following commands will wipe out your disk.

  1. Run the fdisk command with the following syntax: fdisk /dev/sda. We're assuming that the disk is recognized as sda in this case. Note the device name has no number. We're refering to the entire disk, not specific partitions.
  2. Execute the command p. This will show the available partitions. You can keep them, or delete them with the d command.

If deletion of partitions is not in your plans stop here and decide what to do. The following instructions is for starting a whole new disk.

  1. Create a new primary partition number 1. Fdisk will ask for the start cylinder (1) and the end cylinder (dependes of the disk size). I've choosed 3000M. This will create a 3GB sda1 partition.
  2. Create a new primary partition number 2. Fdisk will give the available first cylinder, just accept it, and choose a size o 768M. This will be our swap partition (Very, very large).
  3. Create a new primary partition number 3. Use the remaining disk space.

Now we need to change the partition two to be a swap partition. Execute the t command. Chose partition number 2 and enter hex code 82 (LINUX Swap).

With the command p verify your work. You should have something like this:
Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 366 2939863+ 83 Linux
/dev/sda2 367 460 755055 82 Linux swap / Solaris
/dev/sda3 461 3648 25607610 83 Linux

Write the partition table with the w command and REBOOT

Initializing disks

After rebooting execute the following commands:

  1. Create root file system: mkfs.ext3 /dev/sda1
  2. Create swap space: mkswap /dev/sda2
  3. Create the opt file system: mkfs.ext3 /dev/sda3

Reboot again.

Moving root file system

Now you can move the root file system from flash to disk. Execute the command turnup disk -i /dev/sda1 Further details on using turnup are on the OpenSlug.OpenSlugTurnUp page.

Reboot again

Finishing up

Now all you need is to activate the swap partition and mounting automaticaly the /opt file system.

  1. Execute the command: swapon /dev/sda2
  2. Create on the root directory the /opt dir
  3. Edit the /etc/fstab file
  4. Add the following line at the end: /dev/sda3 /opt ext3 defaults 1 1

Thas it. Now you can proceed installing packages do anything you want.

view · edit · print · history · Last edited by whyme.
Based on work by cnczane, Giovambattista Matera, Dan Händevik, tim, JNC, rwhitby, sunburnt, admiraljkb, and thx1011.
Originally by thx1011.
Page last modified on October 19, 2008, at 12:47 PM