The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Clean Install of Ubuntu 12.10 on Sony Vaio Z (SVZ 2012) How To

    Discussion in 'VAIO / Sony' started by GeraldNunn, Jan 4, 2013.

  1. GeraldNunn

    GeraldNunn Notebook Consultant

    Reputations:
    18
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    31
    I have installed Ubuntu 12.10 three times over the past week before settling on the install described in the how-to below in the next post. Before getting to the how-to, I wanted to pass along some considerations and material I found when I was researching what to do for an optimal install.

    First off to be clear this is for a clean install of Ubuntu 12.10 and Windows is wiped from the machine. Do not use this install if you want to dual boot with Windows though I will talk more about dual booting shortly.

    Also note that keeping partitions aligned on the SSD is important for maximum performance, GParted will do this automatically but if you use fdisk it must be done manually.

    This install uses mdadm to create a software based RAID0 on the two SSDs in the Vaio Z. I tried installing with the FakeRAID but could not get either dmraid or mdadm to let me properly partition the drive, also mdadm is more flexible then fakeRAID. An important drawback to mdadm though is that it doesn't support TRIM. After much deliberation I decided that I would be OK with this as the FakeRAID never supported TRIM in previous Z machines either and I'm confident the controller does a good job of garbage collecting and wear leveling without the TRIM. Also I noted quite a few others had installed Linux on this machine using mdadm in RAID 0 and hadn't reported any issues. If you want to dual boot with Windows I would suggest trying the fakeRAID first as people have reported success installing to it, I may have just been unlucky.

    Having said that, if TRIM is a showstopper for your there are other options. One is to use LVM to create logical volumes with striping as LVM does support TRIM however I suspect the performance will not be as good as mdadm ( Pick Your Pleasure: RAID-0 mdadm Striping or LVM Striping? | Linux Magazine). The other option is to use a file system like btrfs that natively supports spanning file systems across multiple devices, I considered this as well but wasn't confident btrfs was ready for prime time, particularly it's raid features that are used for this.

    Note I did have one installation where I used LVM to set things up to dual boot Ubuntu with a clean install of Windows 8. In this case I broke the FakeRAID and put Windows on the first SDD along with the root mount point for Linux. I then used LVM to create a home mount point that spanned the remainder of the first SSD and all of the second SSD. This worked well and I didn't notice any serious performance issues. One issue here is that I'm not sure that GParted supports LVM partitions, I ended up creating them manually and calculating sizes to ensure the partitions where aligned on the SSD for maximum performance.

    Finally I also considered using UEFI combined with the GPT partition table. I tried this install many times and never could get to work, the grub install failed just like it does for my installation below but it never let pick alternate options and the install would not complete so boot-repair wouldn't work. I'm going to take a second crack at this when Ubuntu 13.04 comes out in a few months and hopefully fixes their installer for better support of RAID
     
  2. GeraldNunn

    GeraldNunn Notebook Consultant

    Reputations:
    18
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    31
    1. Download the 64 bit version of Ubuntu 12.10 or Ubuntu Gnome Remix 12.10 from the appropriate locations and burn it to a flash drive or DVD
    2. As mentioned previously, these steps will WIPE windows, do not follow these steps if you want to dual boot
    3. Burn a recovery disc to bluray, DVD or flash drive using the Vaio Care utility. Test that you can boot from the recovery media before continuing.
    4. Start the Vaio Z and get into the BIOS by pressing F2
    5. Enable the option to display the RAID configuration menu, save changes and exit
    6. Restart the computer and hit CTRL-I when the RAID screen is displayed to go into the configuration. Reset the RAID drives to break the RAID configuration, note there is no going back after this except for the recovery DVD
    7. Reboot the computer and go back into the BIOS and hide the RAID screen configuration. Save changes but before re-starting insert your Ubuntu media
    8. After existing the BIOS screen press F11 repeatedly to force it to boot Ubuntu. If you get a No Operating System restart the computer and try again
    9. Do not run the installer, instead choose the Try Ubuntu option
    10. Use GParted to create two ext4 partitions and one swap partition on both sda and sdb in an msdos partition table. Note that sda and sdb partitions must be identically configured for RAID to work. Also note that GParted will automatically align partitions on MB intervals to preserve SSD alignment. I have a 256 GB model and I partitioned sda and sdb as follows:

    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    31950847    15974400   83  Linux
    /dev/sda2        31950848   241680383   104864768   83  Linux
    /dev/sda3       241680384   250068991     4194304   82  Linux swap / Solaris
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048    31950847    15974400   83  Linux
    /dev/sdb2        31950848   241680383   104864768   83  Linux
    /dev/sdb3       241680384   250068991     4194304   82  Linux swap / Solaris
    
    11. Open a terminal and uninstall dmraid from the live media:

    Code:
    sudo apt-get remove dmraid
    
    12. Install mdadm, note you will get prompted to set a mail configuration, I just chose no configuration:

    Code:
    sudo apt-get install mdadm
    
    13. Create the RAID 0 arrays for / and /home

    Code:
    sudo mdadm --create /dev/md0 --chunk=32 --level=0 --raid-devices=2 /dev/sda1 /dev/sda1
    sudo mdadm --create /dev/md1 --chunk=32 --level=0 --raid-devices=2 /dev/sda2 /dev/sda2
    sudo mkfs.ext4 -b 4096 -E stride=8,stripe-width=16 /dev/md0
    sudo mkfs.ext4 -b 4096 -E stride=8,stripe-width=16 /dev/md1
    
    14. Run the ubiquity installer. When you get to the step where the option "Erase all disks and install Ubuntu" appears select the "Something else" option at the bottom
    15. You will now be prompted to select partitions.
    16. Set the device /dev/md0 ext4 as the mount point for '/', do not format as we formatted it with hopefully optimal settings for the SSD earlier
    17. Set the device /dev/md1 ext4 as the mount point for '/home', do not format as we formatted it with hopefully optimal settings for the SSD earlier
    18. Set the two swap partition as swap mounts
    19. The last part before continuing is to set the boot loader, I tried /dev/sda and when it came time to install grub it failed but prompted me for an alternate location. I chose /dev/md0 and it worked so try /dev/md0 from the get go which should install grub in the / partition but will not install the actual bootloader
    20. Click the Continue button to start the installation, ignore the warning about not formatting /dev/md0
    21. Once the installation is completed do not restart, we need to run boot-repair first
    22. Install and run boot repair, note that boot repair may prompt you about missing dmraid, just ignore it. So in a terminal type:

    Code:
    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair
    
    22. Once boot repair is running, click the 'Recommended Repair' button
    23. You will be prompted to run a set of terminal commands, follow the steps provided and do so. At one point you will be prompted to pick the bootloader location, select /dev/sda though to be honest I was tired and selected both /dev/sda and dev/sdb though only /dev/sda should be required
    24. Now we have to mount and chroot our new installation so we can install mdadm:

    Code:
    sudo mount /dev/md0 /mnt
    sudo chroot /mnt
    sudo apt-get remove dmraid
    sudo apt-get install mdadm
    
    25. Reboot the computer and let it boot from the hard drive and your install should come up.
     
  3. Triple_Dude

    Triple_Dude Notebook Evangelist

    Reputations:
    75
    Messages:
    589
    Likes Received:
    0
    Trophy Points:
    30
    Wow, thanks for such a detailed explanation! I'm curious about one thing, what's the battery life under Ubuntu 12.10? And as a comparison, what kind of battery life were you getting under Windows?
     
  4. GeraldNunn

    GeraldNunn Notebook Consultant

    Reputations:
    18
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    31
    ^ In Ubuntu with the battery at 80% I get just under 3 hours with PowerTop reporting about 13W usage and the display backlight set to half. I never checked the battery usage under Windows 8 so I can't answer that one, sorry.
     
  5. GeraldNunn

    GeraldNunn Notebook Consultant

    Reputations:
    18
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    31
    One thing to do after installation is update the battery care limiter which is set to 100% by default, I used this line to set it to 80%:

    Code:
    echo 80 | sudo tee /sys/devices/platform/sony-laptop/battery_care_limiter #for 80%
    
     
  6. zaidhorse

    zaidhorse Newbie

    Reputations:
    0
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    5
    Do you have a guide to help me dual boot linux and windows with the fakeRaid?
     
  7. GeraldNunn

    GeraldNunn Notebook Consultant

    Reputations:
    18
    Messages:
    116
    Likes Received:
    2
    Trophy Points:
    31
    Sorry but no, I never had any luck getting Ubuntu to install with the FakeRAID
     
  8. zaidhorse

    zaidhorse Newbie

    Reputations:
    0
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    5
    Can somebody send me an iso of the recovery. I upgraded to windows 8 and now the OS doesn't have access to the recovery partition so I can't make the disk through vaio care. Thanks
     
  9. Supermiguel

    Supermiguel Notebook Evangelist

    Reputations:
    29
    Messages:
    550
    Likes Received:
    5
    Trophy Points:
    31
    have the issues with the wireless been fixed in newer revisions of ubuntu? I remember having a hard time enabling the wireless card after it was disable...
     
  10. zaidhorse

    zaidhorse Newbie

    Reputations:
    0
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    5
    I tried Linux Mint 15 and all wireless is working fine out of the box. And since mint is based off of ubuntu ubuntu should be fine as well
     
  11. jartin

    jartin Newbie

    Reputations:
    0
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    5
    Hi there,
    I have an old version of Sony Vaio (VGN-TX2XP) which needs new OS. The system just doesn't boot from CD (and it has no Flash disk booting option) and neither key configuration gets me to the booting process. I was wondering if anything from your detailed guidelines would work on my laptop, but there is no RAID configuration menu in the BIOS, and I wonder whether that might be a problem. Do you have any tips?
    Thanks