Вы находитесь на странице: 1из 8

Install Nvidia Drivers in Ubuntu 15.

04
Lets remove first everything that point to any existing nvidia installation.
open a terminal (ctrr+alt+t) and type:
sudo apt-get remove nvidia*
sudo apt-get autoremove
Update and download a few tools that we will need:
sudo apt-get update
sudo apt-get install dkms build-essential linux-headers-generic
Now its time to blacklist the nouveau driver.
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
And add the following lines:
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Disable the Kernel nouveau by typing the following commands:
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
update-initramfs -u
Now go to nvidia.com and download the driver for your graphic card. The file name should be
something like that NVIDIA-Linux-x86_64-352.21.run depends on the architecture of your machine
and the version of the driver.Reboot your computer and at login screen press ctrl+alt+F1. That will
redirect you to one of the active terminals. Login with your credentials and navigate to your Downloads
directory

cd ~/Downloads/
chmod +x NVIDIA-Linux-x86_64-352.21.run
Replace NVIDIA-Linux-x86_64-352.21.run with the name of the file that you Download in the
previous step.
Stop the X-server:
sudo /etc/init.d/lightdm stop
Execute the installation:
sudo ./ NVIDIA-Linux-x86_64-352.21.run
Follow the instructions on the screen:
At that point you might get a warning that The distribution-provided pre-install script failed! Are you
sure that you want to continue? You can select continue on this one.
Next it will ask you to register the kernel module source with DKMS. Select yes
If you dont have 32 bit compatibility then you will get a warning. Just select ok.
You might get a few more steps depends on the hardware and driver version but just before the
installation finish it will ask you if you want to let the installation to run the nvidia-xconfig for you.
Please let this one run unless you want and you know how to do that manually.
Once you finish reboot your computer:
Reboot
In case that the graphics are not as they supposed to be, open a command line and type the following:
sudo nvidia-xconfig
And then reboot again

http://askubuntu.com/questions/616426/starting-version-219-after-upgrading-to-15-04

How to install a WD Advanced Format Drive on


non-Windows Operating System
It is recommended to read the WD Advanced Format Technology White Paper as an introduction to the
technology. The key requirement for Advanced Format Drives to give their best performance is the
alignment of partitions to match the 4KB boundaries of the drive's internal sectors.

Windows:

For information about using Advanced Format Drives under Windows, refer to About WD Advanced
Format Technology.
Mac OSX:

Mac OSX version 10.4 onwards (Tiger, Leopard and Snow Leopard) can use the GUID Partitioning
Table scheme (GPT) which will align an Advanced Format drive correctly. Mac OS versions using
Apple Partition Manager (APM) will not align partitions correctly and will not provide optimum
performance.
Linux
Linux as an operating system is a combination of a kernel, user space utilities and customized
packaging provided within the "distributions" such as Ubuntu, SuSE and Redhat.
The Linux kernel has had specific support for the alternate sector sizes and offsets used by WD
Advanced Format disk drives since version 2.6.31. However, distributions based on Linux 2.6.34, the
latest stable version of Linux, will provide the most thorough support. Advanced Format parameters are
available in the sysfs file system from this kernel version onwards. Kernel versions older than 2.6.31
will not specifically detect Advanced Format Drives, but with proper alignment the system
performance will be maintained. To ensure the best performance, it is important to:

Align partitions to the internal 4KB sector boundaries of the drive.

Make sure that data writes are aligned to 4KB sector boundaries.

Partitions are created by a number of possible utilities under Linux with "fdisk" and "parted" being
typical command line tools. Parted is one of the better tools and from version 2.1 onwards it includes
support for aligning Advanced Format drives. Fdisk and earlier versions of Parted won't automatically
align partitions but can be used manually to set up the correct partition boundaries.
The Linux partition editor: parted, has an alignment option to ensure that Advanced Format drives are
correctly configured from version 2.1:
-a alignment-type, --align alignment-type
valid alignment types are:
noneAligns to 512 byte sector boundaries.
cylinderAlign partitions to cylinders.
minimalUse minimum alignment: 4KB on AF drives
optimalUse optimum alignment: 1MB boundaries

The default from parted 2.2 is to align to 1MB boundaries - optimal. Use minimal or optimal for
Advanced Format drives. For example if your drive is sda:
parted -a optimal /dev/sda

will ensure that parted creates partitions on 1 MB boundaries.


If older versions of parted (pre 2.1) or fdisk are used to create partitions, a manual calculation of
partition boundaries will ensure optimum performance of Advanced Format disk drives. The
partitioning tool needs to be set t work in units of sectors rather than cylinders or Megabytes for
example. Under parted, enter:
unit s
For fdisk, simply entering "u" will toggle between cylinder and sector mode. Make sure that all
partitions start on a multiple of 8 sectors (8x 512B = 4KB) and that partition sizes are multiples of 8
sectors. Make sure that there is space left at the start of partitions as required. For example on a boot
drive, do not start at sector 0 as there needs to be space for the boot code. Sector 64 is a good start point
or even 2048 which would be a 1MB boundary. Also extended partitions will need a gap between their
start point and the first logical partition contained within them.
The file system defaults on most Linux systems are to use blocks of 4KB data. Typically no specific
actions are needed to configure block sizes for WD Advanced Format drives. For options on block
sizes for the mkfs tools, consult the "man" pages. Note that for the e2fstools used for file system
creation, version 1.41.10 onwards will warn the user that they are attempting to make a file system on
an unaligned partition. The user is advised to repartition appropriately.
The installation defaults for Linux distributions create partitions based on pre-defined rule sets which
may not allow for Advanced Format drive geometry optimisation. Current distributions will probably
require manual setup of partitions as described above. Before running the installation process, access a
4

command line terminal and create the required partitions using parted or fdisk. Once created, use the
installer's option to install on existing partitions rather than create a new or modified partition table.
Assume that distributions released in 2009 or earlier will not take account of Advanced Format drives.
Western Digital has been working with the Linux kernel development teams and with the vendors of
the some of the more popular Linux distributions. Starting with Linux Kernel Version 2.6.34, the latest
stable kernel release, the default installations will align partitions to the most appropriate boundaries on
Advanced Format disk drives. For example, the following distributions will default to good alignment
for Advanced Format disk drives: Ubuntu 10.04, Fedora 13, Redhat 6 and derived products. It is also
expected that by release time Debian 6 (Squeeze) and openSUSE 11.3 will have completed the changes
required for the default installation to be well aligned.

One More tutorials


Given the fact that the Advanced Disk Format disks (ECC bits are to be found at an interval of 4Kbytes
instead of 512 bytes) emerge fast enough into the market I thought that this tutorial may start
becoming useful as I had to search a lot around the Net in order to find the fix for this problem
The drive lies the BIOS and the operating system that it has 512 bytes per sector for backward
compatibility purposes (many BIOS-es will refuse to "see" a drive with different geometry).
In order to run the drive at an optimal speed the partitions should start at multiples of 4096 bytes
(otherwise it may take two spins instead of one in order to read the ECC bits for the sector that is read,
which may cause performance loss).
The best way to overcome this problem is to use parted.
Parted aligns the partitions automagically only if you start it with the following option:
# parted --align opt /dev/sdX (where X varies according to your HDD)
After being started with the above switch parted will align all the partitions created in such a way that
every partition on the drive will start from a cylinder that is divisible by 4096. This will make all the
ECC bits of a sector available to the drive in the same spin of the drive.
Of course you may also use the fdisk utility but it will require some good maths and patience, thus I
don't recommend using fdisk. cfdisk is strictly "forbidden" if you want optimal positioning of the
partitions as it does not know about the new disk format.
After creating the partitions you may check the right alignment by using parted's command (inside
parted run: align-check opt Y); where Y is the number of the partition you want to check if it is
correctly aligned.

Align GPT partitions on 4K sector disks


Posted on February 23, 2014

Im upgrading the storage in a offsite backup server to two new disks. The new disks are of 3TB each
which pose some challenges when it comes to partitioning. Here is a quick background to this issue.
Why is it an issue to partition disks larger than 2TB?
Historically, data stored on the actual disks have been stored in 512 byte chunks, called a sector. 32 bit
addressing of sectors creates the following limit:
512 bytes * 2^32 = 2199023255552 bytes = 2T bytes

And there you have it. Newer disks have transitioned to 4K/4096 bytes physical sectors which
extends this limit to 16TB. But
Why is partition alignment crucial to storage performance?

To complicated things further, disks often expose 512 bytes logical sectors to the operating system for
legacy support. This might cause tools to believe it is okay to begin and end a partition on any 512 byte
sector border, which might not be a 4K byte sector border that is stored on the disk.
How do you align partitions in Ubuntu with GNU Parted?
GNU Parted is a tool that supports GUID Partition Table, GPT, setup under Linux. Parted have some parameters
to aid in the alignment of partition starts and ends. Lets launch parted with:
$ sudo parted --align optimal /dev/sdX
Where sdX is the drive we intend to view and/or modify. The align optimal is the aid in the alignment. In parted
we can view the current partition table with the command print:
1
(parted) print
2
Model: ATA ST3000VX000-1CU1 (scsi)
3
Disk /dev/sdX: 3001GB
4
Sector size (logical/physical): 512B/4096B
As we can see, the drive has 4K physical sectors but presents 512 logical sectors. A tricky part I struggled with
for hours was to calculate the partition sizes with the unit set to sectors. In my opinion, parted could be more
clear on what sector size it presents to the user. To figure this out I issued the following:
1
(parted) unit B
2
(parted) print
3
Model: ATA ST3000VX000-1CU1 (scsi)
4
Disk /dev/sdX: 3000592982016B
5
...
6
(parted) unit s
7
(parted) print
8
Model: ATA ST3000VX000-1CU1 (scsi)
9
Disk /dev/sdX: 5860533168s
Making the calculation, bytes per sectors:
1 3000592982016B / 5860533168s = 512 byte/sector

So, even though this is a 4K drive, parted is using 512 byte sectors for viewing partition starts, ends and
sizes.
Setting up partitions with parted
First, lets setup a gpt partition table with the following command:

(parted) mklabel gpt

This was the partition layout I wanted to achieve:


Partition
sdX1
sdX2
sdX3
sdx4

Size
8GB
250GB
1200GB
1542GB

Usage
swap
/
raid
raid

Initially, I tried calculating the partition sizes using the sector unit to make sure that each partition
border aligned with the physical sectors. Often, parted complained about the alignment with:
1 Warning: The resulting partition is not properly aligned for best performance.
What helped was to use the unit MB for the starts and ends. Here is the final parted commands:
1
2
3
4

mkpart primary 1 0% 8000MB


mkpart primary 2 8000MB 258000MB
mkpart primary 3 258000MB 1458000MB
mkpart primary 4 1458000MB 100%

Notes: Using 0% default to the first 1MB border that is correctly aligned. The same goes for 100% which makes
sure the last partition aligns with the end of the disk. Here is the resulting partition layout:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

(parted) unit s
(parted) print
Model: ATA ST3000VX000-1CU1 (scsi)
Disk /dev/sdX: 5860533168s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 2048s 15624191s 15622144s 1
2 15624192s 503906303s 488282112s 2
3 503906304s 2847655935s 2343749632s 3 raid
4 2847655936s 5860532223s 3012876288s 4 raid
(parted) unit compact
(parted) print
Model: ATA ST3000VX000-1CU1 (scsi)
Disk /dev/sdX: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 8000MB 7999MB 1
2 8000MB 258GB 250GB 2
3 258GB 1458GB 1200GB 3 raid
4 1458GB 3001GB 1543GB 4 raid

To verify that the partitions are aligned, the following command can be executed, with P being the partition
number:
1
2

(parted) align-check optimal P


P aligned

Вам также может понравиться