- First, use LVM; it makes resizing filesystems nearly trivial, robust, without any real downsides. Just another way that Ubuntu is not enterprise-worthy. But, we don’t have LVM on these systems’s as they are….
- Second, before doing any operations on your partitions, always perform and test a backup (to a separate system!) of your data. You may make your system unbootable and/or nuke all of your data!
- The system I performed these steps on was partitioned thus:
- /dev/sda – 7GB – /
- /dev/sda2 – remainder – Extended partition
- /dev/sda5 – swap – partition within the extended partition.
- So, to grow “/”, we will become root, delete the swap partition and the extended partition, grow /, and then re-create the swap partition. Adjust the steps below according to the partition numbers and layout of your particular system:
- Disable swap:
- swapoff /dev/sda5
- Delete and re-create partitions as appropriate.
- fdisk /dev/sda
- print out partition information (p)
- Delete partition 5 (d – 5)
- Delete partition 2 (d – 2)
- Delete partition 1 (d)
- Create partition 1 (n – p – 1)
- It must start on the exact same sector as before (as seen in the print command)
- It must end on a sector higher than it did before. Num_GB*1024*1024*2 = ending sector
- Create partition 2 (n – p – 2)
- Change partition 2 to type “Linux Swap” (t – 2 – 82 )
- Activate partition 1 to make it bootable (a - 1)
- Double-check everything.
- Exit (w)
- recreate the swap partition, using a label:
- mkswap -L swap /dev/sda2
- add a label to the root filesystem
- e2label /dev/sda1 / (in centos, it’s e4label)
- Fix up /etc/fstab
- Fix the “swap” line to use LABEL=swap instead of UUID=
- Fix the “/” line to use LABEL=/ instead of UUID=
- swapon /dev/sda2
- Fix up /boot/grub/grub.cfg
- Either: Find the “linux” line for the menu option you will boot, change UUID= to LABEL=/
- Or: update-grub
- Re-create the initrd
- update-initramfs -u -k 3.2.0-38-generic
- Reboot the VM. *Cross your fingers!* This is your moment of truth.
- Grow the root filesystem
- resize2fs /dev/sda1 (resize4fs on CentOS, I believe).
- If it didn't boot, then that's what you get for biting off more than you could chew, and for choosing a distro that doesn't leverage LVM. Boot off your Ubuntu/Mint install disk, and copy off your data to a USB disk, and start over. (...but you DID back up your data anyway, right?)
Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts
2013/12/06
Grow root partition and filesystem in Ubuntu and Linux Mint
Here are the steps to grow the root filesystem on an existing system that does NOT use LVM:
2013/02/07
Tweaks for Linux Mint
These were started with Linux Mint 14.1 Cinnamon
Menu bar shows up on the wrong screen:
Do this to find out the name of the displays:sudo xrand -qDo this to make the menu show up on one display or the other, for example:sudo xrand --output VGA1 --primary
Sound doesn't come out through the correct device (speaker, headphone, etc.):
run these: sudo apt-get install alsa-base alsa-utils pavucontrol pavumeter pamanalsamixer
...then in alsamixer, select the desired output "card", then ensure that "automute" is set to disabled or some other device.
I want to watch Netflix on Mint:
Run these commands: sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get install netflix-desktop
Display locks up with my NVidia card:
During install, select "compatibility mode".After install, before logging in, select session type "Cinnamon 2D", thensudo apt-get install nvidia-current nvidia-settingssudo reboot
2010/07/04
Ubuntu tweaks
I'll try to update this to keep track of the tweaks I find necessary for ubuntu to work well.
Install System-wide Pulseaudio Equalizer:
sudo add-apt-repository ppa:psyke83/ppa
sudo apt-get update
sudo apt-get install pulseaudio-equalizer
Install Pulseaudio tools and alsaplayer plugin, etc:
sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter
Multimedia Playing
sudo apt-get install totem vnc ubuntu-restricted-extras
sudo apt-get install libdvdread4 && sudo /usr/share/doc/libdvdread4/install-css.sh
Send email from cli with attachments
sudo apt-get install mutt
echo "see attached" | mutt -s "file attached" -a Documents/somefile.xls -- jdoe@somewhere.com
Network Troubleshooting Tools
sudo apt-get install iputils-tracepath nmap aircrack-ng
Remote Systems Administration
sudo apt-get install gtkvnc rdesktop tsclient
Subscribe to:
Posts (Atom)