сряда, 30 юли 2014 г.

How to make a bootable USB under linux

I'm ashamed to admit it, but it turned out I need to install Windows to check whether all my hardware is working properly (because I have no way to know if it's not working or simple not recognized by Sabayon). So I needed to make a bootable USB.
I tried untebootin and winusb, but both didn't work, for different reasons.I tried also with what seemed most likely to work - dd:
$sudo dd if=/path/to/iso/windows.iso of=/dev/sdg bs=4M; sync
both with ntfs partition and fat32 partition, but somehow dd destroyed the partition table and the USB was unbootable.
So here's what worked for me in the end:
Of course, first you need to locate and empty your USB from everything important.
1. To find the device of your usb:
$sudo fdisk -l
2. Unmount the USB (say it's /dev/sdc1):
$umount /dev/sdc1
3. Format it as FAT 32 - I also have no idea if this is essential, but it worked.
$sudo mkdosfs -n 'USB-Drive-Name' -I /dev/sdc -F 32
4. Mount the ISO you have the usual way:
$mount -o loop /path/to/win.iso /usual/mount/directory
5. Go to your loop directory (it appeared in Dolphine sidebar for me) and copy all the files there to your USB (you'll have to mount it for this).
6. Unmount your USB and reboot to use it.
These steps follow partially this link, I changed only the last steps, where they use dd to copy the iso. I tried this, but again, I got unbootable USB. I tried also partitioning it with gparted and setting a boot flag, but again, after using dd, the partition table was gone. Maybe there is a simple way to do it with dd, I just don't know it and couldn't find it quickly enough.

вторник, 15 юли 2014 г.

kdesu failing to start - bad display name

The problem was simple. I was trying to launch something with kdesu and I got the "bad display name ":0.0" " error.
After some googling, I found this gentoo thread ,where the solution turned out to be to use "xhost +" to allow the connection to the X for root users and then to use "xhost -" to stop it. It worked.