Академический Документы
Профессиональный Документы
Культура Документы
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
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:
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
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.
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:
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
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