Friday 16 March 2018

Solving "No Partitions Present" When Installing Xubuntu/Kubuntu/Ubuntu

When I was installing Xubuntu using DVD or USB stick I was faced with the problem of finding no partitions showing in the partitioning screen. I only see a complete /dev/sdX with no partitions present.

After installing 14.04, 16.10 and 17.10 and spending a lot of time very late at night I finally found after researching that the disk has RAID metadata which seems to confuse the partitioning software. To fix this I did the following:


sudo dmraid -rE /dev/sdX

Here -r means raid and -E erase metadata. In combination it will remove the old metadata. Do this in the "Try Xubuntu" by opening a console. If the package is not found install using apt.

I had also tried GPT fixing before using FixParts but the program said my partitions were okay. So to make you aware it would not be the GPT but the software RAID that might be causing the problem.

References:

  1. https://askubuntu.com/a/329115
 

Sunday 11 March 2018

Using serial device file without sudo or root permissions

When we use the PL2303 or any other connector we get the serial device file as /dev/ttyUSBx where x=0,1,2,3... . If we see the permissions of this file we find that the owner is root and the group is dialout. Hence using a serial console program with normal user permissions will not work as I would not have the appropriate permissions. To fix this first add the user to the dialout group.

Next we modify the udev rules file with the appropriate rules as follows:

ATTRS{idVendor}=="xxxx",ATTRS{idProduct}=="yyyy", MODE="0660",GROUP="plugdev"

Replace "xxxx" and "yyyy" with your USB vendor ID and USB product ID respectively.

I create a file named <somenum>-serialadapter.rules in /etc/udev/rules.d/

Next to trigger the above rules we do the following:


sudo udevadm control --reload-rules && sudo udevadm trigger

Now we can use screen or minicom on the device file without using root or sudo.