Saturday, November 4, 2017

partitioning - Resizing ext4 partition and applying it to an NTFS partition in Ubuntu 12.04.1?

I made a miscalculation on my Ubuntu install and now need more space for my Windows (NTFS) partition (sda2). The problem is that I allocated ~ 100GiB to what I thought would be a shared media storage directory; this was placed in an extended partition (sda4), comprised of ~ 7GiB in a swap file (sda5) and ~ 100GiB in an ext4 storage partition (sda6), respectively. I no longer require this partitioning and am now looking to allocate this sda6 space more judiciously.


As I understand it, I need to be able to have unallocated space in a partition next to the partition that I would like to add space to. There I have a problem, as I need to move ~55GiB from sda6 (ext4) to sda2 (NTFS). Please note that sda1 is a small NTFS Windows boot partition and sda3 is my ext4 Ubuntu install partition that does not have any unallocated space (at present), and only 22GiB unused.


Lastly, I am presently in GParted off of a USB boot and have a pending operation of shrinking /dev/sda6/ from 99.96GiB to 44.18GiB, but alas, I cannot add to sda2 as was my intention. I have backed up my system, though I would prefer not to undertake anything with a large probability of file loss or grub2 failure. May I please have any relevant recommendations? Thanks so much in advance.


ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8d769ec6
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
/dev/sda2 409600 341301247 170445824 7 HPFS/NTFS/exFAT
/dev/sda3 341301248 399894527 29296640 83 Linux
/dev/sda4 399896574 625141759 112622593 5 Extended
/dev/sda5 399896576 415518719 7811072 82 Linux swap / Solaris
/dev/sda6 415520768 625141759 104810496 83 Linux
Disk /dev/sdb: 4022 MB, 4022337024 bytes
255 heads, 63 sectors/track, 489 cylinders, total 7856127 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 38 7839719 3919841 b W95 FAT32

command line - Alternative package manager for ubuntu terminal?

I'm looking for:



  • Alternative package management to be used from my gnome-terminal (text-based method) that can be a candidate to replace apt-get and aptitude.


  • Preferably one with detailed and easily read outputs, reduced command options (like perform update before a search), and go fast enough.



Does any one know a alternative package manager?

usb creator - How to create a bootable usb stick on OS X



http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx



When I get to the step of converting the .iso to an .img it continues to respond as such: " -bash: /Users/RidgeJohnston/Downloads/ubuntu-14.04.1-desktop-amd64.iso: Permission denied "




How can I get passed this denied action and complete the processes?



Try the following command



hdiutil convert -format UDRW -o ~/Downloads/ubuntu.img ~/Downloads/ubuntu-14.04.1-desktop-amd64.iso



Use sudo before the command if required.



This will convert the iso file to an img file and save it as 'ubuntu.img' in your Downloads folder.




Run diskutil list and determine the device node assigned to the USB Drive eg- /dev/disk2



Now unmount this disk diskutil unmountDisk /dev/diskN where N should be replaced with the node number determined above eg- 2.



Now, write the image to the USB drive using the command



sudo dd if=~/Downloads/ubuntu.img.dmg of=/dev/rdiskN bs=1m



where N should be replaced with the node number.



Friday, November 3, 2017

bootloader - How do I find out which boot loader I have?


I know Grub is the one installed by default when installing Ubuntu but I am faced with an embedded system running 9.10 Desktop Edition. Following are the contents of lsb-release file


ubuntu@ubuntu-desktop:/boot$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"

but this system does not have Grub bootloader and I want to find out which one its using. So any ideas?



The boot info script will detect all kinds of useful information about your boot configuration:


http://sourceforge.net/projects/bootinfoscript/


How to "finish" a command in terminal?




When I run commands and I want to exit, I just press Ctrl+C and it works. But there are some times when this does not work, and the only way of executing another command is closing the terminal and opening a new one. I would like to know how to force the exit. For instance, it happens when I run:



git log 


It starts reporting all the commits, and if I press ESC or END I can read the words END and ESC in the bottom, but nothing happens if I press them. So, what does it mean? What is the way of finishing any command?



In the git log example, just hit the q key. Q quits the current action. Q also works in the more command, and others.


hardware - Why does my USB mouse seem to randomly quit working?

While I am doing stuff... doesn't seem to matter what, my USB mouse just stops working... sometimes it will be the keyboard as well but usually not as often. Ubuntu forces me to press my power button to recover my mouse again.



Any ideas?



Let me know if you need more information.



This is a dual boot system and only happens on Ubuntu, and it works fine under Windows

Update of latest kernel

I'm quite new to Ubuntu;

I read the following on this page:




How to update kernel to the latest mainline version without any Distro-upgrade?



"The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades."




By "updated automatically" and "no action is required" does this mean that the kernel installs itself in the background without me knowing (sounds more like something that Windows would do, not Linux) or is it supposed to appear in the Update Manager, then I click on "Install now" to install it?




Currently my Update manager tells me there's a new kernel to be installed, "Complete generic Linux kernel and headers" and "Ubuntu base" totaling 66MB.
If that's normal then I shall install them.
Thanks.

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...