Showing posts with label live usb. Show all posts
Showing posts with label live usb. Show all posts

Saturday, August 10, 2019

How to change Linux swap partition to different disk...

The scenario:
I have two hard disks on my laptop,
- 256 GB SSD (nvmeOn1)
- 1 TB HDD (sda)

Installed Ubuntu, below is how my partition table looks like:
nvmeOn1
        EFI                                  100 MB
        Microsoft reserved partition          16 MB
        Basic data partition              217.35 GB
        /                                     20 GB
        Recovery                               1 GB
        Unallocated                        14.34 MB

    sda
        Basic data partition              465.76 GB
        /opt                                9.54 GB
        /usr                               37.96 GB
        linux-swap                             6 GB
        /home                             412.26 GB

I want to change swap partition from HDD to SSD. Here's the steps:
1. Boot the machine with Ubuntu Live USB
2. Delete existing linux-swap partition on HDD (Resize any existing partition to make use this new unallocated partition)
3. Resize / partition on SSD to make space for new swap partition
4. Create new swap partition
5. Shutdown, remove Ubuntu Live USB and restart the machine
6. Now in Ubuntu, open terminal and run the command below
$ sudo blkid

    # output would be something like this
    /dev/nvme0n1p6: UUID="581446b5-7fab-46b0-ba3a-569c0fc42be3" TYPE="swap" PARTUUID="646e1aba-ebff-40e7-86c2-155211f485d5"

7. Look for "swap" and copy UUID from the newly created swap partition
8. Edit /etc/fstab file by running command below (don't forget to backup first)
$ sudo nano /etc/fstab

9. Replace the old UUID for swap with the new one.
10. Save the file and reboot the machine.

To verify, we can use free command
$ free

    # output
                  total        used        free      shared  buff/cache   available
    Mem:       32774452     1315660    30136320       34844     1322472    31009776
    Swap:       6292476           0     6292476

Or swapon -s command
$ swapon 0s

    # output
    Filename    Type  Size Used Priority
    /dev/nvme0n1p6                          partition 6292476 0 -2

This is how my new partition table looks like:
nvmeOn1
        EFI                                  100 MB
        Microsoft reserved partition          16 MB
        Basic data partition              217.35 GB
        /                                     14 GB
        linux-swap                             6 GB
        Recovery                               1 GB
        Unallocated                        14.34 MB

    sda
        Basic data partition              465.76 GB
        /opt                                9.54 GB
        /usr                               43.96 GB
        /home                             412.26 GB

Wednesday, April 20, 2011

SARDU vs YUMI...

  SARDU YUMI
Multibootable USB Yes Yes
Multibootable CD/DVD Yes No
Support XP/7 installer Yes Yes, with some tweak. Please refer to Very Important note here.
Support Linux installers Yes Yes
Summary Pros:
  • Works on Windows (XP/7) installer flawlessly.
  • When tested with Windows 7 Ultimate, SARDU somehow exposed an option to install different flavor of Windows 7 in the installer.
  • Ability to put the installers into an iso and burn it into CD/DVD.
  • Doesn't required to be install on machine.

Cons:
  • Need to copy the iso's into ISO folder for SARDU to detect it.
  • Need to rename the iso's into specific name listed on SARDU website.
Pros:
  • Iso's need not be renamed nor required to be in any specific path location.
  • More recent Linux version available in the supported list.
  • Doesn't required to be install on machine.

Cons:
  • Unable to put the installers into an iso file and burn to CD/DVD in case if needed for machine that couldn't boot via USB.
  • Have some minor issue with Windows 7 installer. Check the workaround at Very Important note here.


Update (25/05/2011)
There's a new multiboot iso creator tool call XBOOT. In terms of usability it is straight forward. Simply drag and drop the ISO's (love the drag and drop features). However the downside is that it require .NET framework 4 to works and didn't support Windows installer.

Conclusion:
For multiboot iso creator, if you're on Windows system and
- want to use the tool to create the usb/cd boot that support both Windows and Linux installer, go for SARDU
- want to use the tool to create the usb boot (and not even bother about cd boot), go for YUMI
- want to use the tool with nice GUI to create the usb/cd boot (and not even bother about Windows installer), go for XBOOT

Bottom line is, it's all about choices. Choose the best tool that will suit your need.

Wednesday, April 13, 2011

Creating Windows USB startup disk...

As written in my previous post, I would like to test a couple of USB startup disk creators for Windows (that can put our beloved Windows installer into USB device). So now, here's the result. I would say that SARDU (imho) is the best tool currently available. Bonus part, you don't even need to install. Simply extract the zip file and voila! you ready to go. Here's the step by step on how to:

1) Download the zip file from here.

2) Extract it into your D:\ drive.

3) Go to extracted folder and copy your windows installer (in .iso format) into ISO subfolder.

4) Rename the iso file based on OS like listed below:
  • Windows Vista - InstallVista.iso
  • Windows 7 - InstallWin7.iso
  • Windows XP Home - Install_XP_Home.iso
  • Windows XP Pro - Install_XP_pro.iso
  • Windows XP 64 - Install_XP_x64.iso

ISO folder


5) Execute sardu.exe, notice that your Windows installer has been detected by SARDU.

Windows installers detected


6) Plug in your USB thumb/pen/whatever you may call it drive and click "Search USB" button. Make sure it's using FAT32 file system (otherwise you may need to re-format it).

USB device detected


7) Once your USB pendrive detected, click button with pendrive icon to start the process.

Processing...


8) Once completed, close SARDU and unplug your USB pendrive. Plug it into any machine that support boot up via USB, restart and press boot menu key (F12 for Dell). Select USB device and you're in.

SARDU boot menu


Note:
Tested with Windows XP Pro and Windows 7 Ultimate 32-bit installer.

If you just need Windows XP installer, 1 GB pendrive should be sufficient enough.

For Linux users, MultiSystem does support Windows 7 and XP installer via syslinux and grub4dos option respectively. However from my test result, it only works for Windows 7. No luck for XP.

Update (14/04/2011)
I forgot to mention that if you want to install XP on SATA hard disk, you need to slipstream the driver into the installer. This can be done via nLite. Reference to SATA drivers for XP. However, I'm still unable to make my slipstreamed installer works.

Update (15/04/2011)
It's difficult to test the slipstreamed installer on VirtualBox. Solved the first BSOD by changing disk type from IDE to SATA. Second BSOD (happened at second stage) might be due to the different type of SATA driver required by VirtualBox. Wish I could get a real machine soon.

Update 2 (15/04/2011)
Slipstreamed installer works!!! Tested on real SATA hard disk. Perfect solution for netbook (USB pendrive + XP installer + SATA drivers).

Wednesday, March 9, 2011

USB startup disk creator for Linux and Windows...

Info: If you're searching for "how to create Windows USB installer", click here.

When started playing with Linux distro, I realized that I need to have a lot of blank CDs / DVDs so that I can burn the downloaded iso image and test the LiveCD on my machine (to make sure all the devices working as expected before installing). End up with a lot of cd / dvd installers that been used once and forgotten. Then, saw an option to use USB pendrive as an installer. At initial stage the process was quite tedious, but now since the technology has matured there's a lot of tools available that can do the process easily. I'll list down a few of it for reference. Some history about Live USB.

Prerequisites:
  • Fat32 Formatted Flash Drive
  • PC that can boot from USB

Name: UNetbootin
Platform: Linux / Windows

Summary:
"UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on both Windows and Linux. You can either let UNetbootin download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list."

My comment:
The most famous one.
Name: MultiSystem
Platform: Linux

Summary:
"Multisystem enables a LiveUSB to do everything, ideal for exploring different Linux distributions without installing on your PC, and it seamlessly; or to install the Linux distribution of your choice on your PC much faster than via a LiveCD with fast USB 2.0 ports Essential throughout the current range of netbooks that have no CD drive."

My comment:
My favorite one. Love the ability to bundle multiple distros and had a GRUB menu as a selection to which distro to be use.
Name: Ubuntu Live USB creator
Platform: Linux

Summary:
"Ubuntu Live USB creator (usb-creator) is an official tool to create Live USBs of Ubuntu from the Live CD or from an iso image. The tool is by default included in all releases after Ubuntu 8.04, and can be installed on Ubuntu 8.04. A KDE frontend was released for Ubuntu 8.10, and is currently included by default in Kubuntu installations. To run the current version on Ubuntu or other distributions, enter either usb-creator-gtk or usb-creator-kde at the command line."

My comment:
First tool that I've used for the task.
Name: SARDU
Platform: Windows

Summary:
"Shardana Antivirus Rescue Disk Utility (Sardu) is software that can produce an ISO or an IMA anti-virus bootable CD, a comprehensive collections of utilities, the most popular distributions of Linux Lite, and the best known Windows PE. It is freeware (it is licensed as an individual ISO / IMA). Once the files are extracted Sardu creates a CD / DVD or USB bootable device with a handy menu divided into four categories: Antivirus, Utilities, Linux, and PE."

My comment:
Seems to me this is the best tool available on Windows platform. You can also have the recovery disk for XP, Vista, Seven or XP (64bit, Professional or Home) in a practical multi-boot menu. Definitely going to try with this one.
Name: Universal USB Installer
Platform: Windows

Summary:
"Universal USB Installer is a Live Linux USB Creator that allows you to choose from a selection of Linux Distributions to put on your USB Flash Drive. The Universal USB Installer is easy to use. Simply choose a Live Linux Distribution, the ISO file, your Flash Drive and, Click Install."

My comment:
An option for Windows user. One Distribution can be installed at any given point in time.
Name: MultiBoot USB
Platform: Windows

Summary:
"MultiBootISOs enables each user to create their own custom Multiboot UFD containing only the Distributions they want. New Distributions can be added to your UFD each time the tool is run."

My comment:
Same feature as MultiSystem but for Windows user. One thing that attract me to this tool was the ability to put Windows Vista / 7 installation disk into the USB. I haven't try this one yet.

Update (02/04/2011)
Tested the tools for Windows platform. Personally I would say SARDU is the best tool available for Windows.