Monday, July 22, 2019

partitioning - Shrink mounted linux partition


I want to shrink a Linux partition to make room for a Windows 7 installation coming up, but GParted (running within Linux) will not allow me to shrink the mounted /dev/sda2 partition.


Is there any way around this, or must I boot into GParted from a USB drive?


Answer



You must boot from a USB drive or a Live CD so that the partition isn't being used. You can get a bootable GParted Live CD from http://gparted.sourceforge.net/livecd.php


Once you have the ISO, you can use Unetbootin to make a bootable USB drive form the ISO.


Sunday, July 21, 2019

Keeping bootable images of all my operating systems and run them over LAN


I love being able to run what ever, whenever.


Is is possible to store images of all my operating systems on a server, and run them over a LAN whenever I need to, on what ever computer I log in from?


I would love to imagine this would work kind of how I think cloud computing works, in that you can spool up a computer image whenever you need it and get it running.


All shared documents would be kept on another server, and I understand I wouldn't be able to share programs between images either, each would need their own install.


Just wondering what kind of flex I have.


Answer



It would be possible to do a physical to virtual conversion of a running system and then you could mount it using a Hypervisor such as VMWare ESX/VSphere or Microsoft's Hyper-V. You would then simply start the OS you wanted and connect using a tool such as RDP or VNC. You could also create clean images from original media and then start fresh if converting is not an option


Desktop options such as Vmware Player or Workstation could work as well.


Shared storage could be accessed as long as the OS and the storage support that.


As you note, programs would need to be installed in each virtual machine


macos - How to type braces on Danish Mac keyboard when RDP'ing into Windows ?


Context: I am on a Mac (Macbook Pro) running OS X Lion with a Danish keyboard layout. I sometimes have to RDP (using the Microsoft RDP client for Mac) into a Windows machine, that also has Danish keyboard layout.


In this environment I cannot figure out how to type curly brace {} or hard braces []. On the windows machine I will use the AltGr key (right alt key, which is found on Danish Windows keyboard) + the 7 or 0 key for curly braces. But this does not work on Mac. There is no designated AltGr key, and trying the right Alt key does not work (I type nothing when trying the combination).


How do I type the characters in this environment, that would normally require the AltGr key ? Is there anyway to change the mapping so the right Alt key gets this function when I am connected to the Windows machine ?


Answer



Control + option functions as AltGr in some remote desktop or VM applications, apparently including Microsoft Remote Desktop Connection client.


In some other applications enter (⌅, not return) can be used for AltGr.


Another option might be to install Boot Camp drivers on Windows. It adds Apple versions of some keyboard layouts (that don't use AltGr) to the control panel. See VMware KB: Using an alternate keyboard layout for a virtual machine in VMware Fusion.


ubuntu - Battery: uncharging?


I have a Lenovo Laptop (G470). My OS is Ubuntu.


Five minutes ago my computer said that only two minutes were necessary in order to have the battery fully charged. Right now the indicator says that I should wait ten minutes. What is happening? Is my battery or charger damaged? Is my battery uncharging?


Thanks in advance!


Answer



Without being totally sure, I would guess, this is to guarantee a long living battery.


Your charging controller is discharging and recharging your battery at the very top (about 98%) of its capacity. This prevents some issues (which I don't remember), which might shorten your battery life.


It seems legit that Ubuntu doesn't "know" about that and is just interpreting the raw numbers.


raid - Converting software RAID1 to hardware RAID1 without losing data

I have a home server running Ubuntu Jaunty and housing a 2 x 2TB RAID1 array. It is a software RAID but I'm looking to pull out those drives and put them in a external RAID enclosure to save space. My question is,


Will I be able to just "plug in" the drives and have it work, or will I have to reformat/rebuild the array?


Does anyone have experience using RAID enclosures?

Saturday, July 20, 2019

macos - SQL Developer Can't locate Java on Mac OS

I have downloaded Oracle SQL Developer and when I attempt to run it i get the following message:


enter image description here


These are the java settings on my computer:



  1. java -version: java version "12.0.1" 2019-04-16

  2. "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -version : java version "1.8.0_211"
    Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

  3. which java: /usr/bin/java

  4. echo $JAVA_HOME: blank

  5. On the Java control panel in System preferences, the JRE path is: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java


How can I get SQL developer to recognise my Java installation?

windows 7 - Create Password = Password incorrect


-Windows 7 Home Premium, 64-bit, Administrator account


Previously, my password stopped being a valid entry to login to my Windows 7 user account. I didn't change it. Possibly a memory error, but I really don't know. To band-aid the issue, I used Konboot to remove the password and I now have access to this account by just hitting the Enter key instead of entering a password. But, this is of course no good as I would prefer to have a password.


When I attempt to create a password for this account, Control Panel tells me that, "The password you typed is incorrect. Please retype your current password." There is no option to enter the old password before I enter a new one in this menu, as the menu is "Create a password for your account," not "Change your password."


Why/how could this have happened?


Answer



Coming back after some time:


The only functional way I was able to change my password was Ctrl + Alt + Del -> New Password, so it's a bit embarrassing that I didn't think of that before. It certainly did not work from the Manage Users.


Re-installing Windows 7 removed this memory error.


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...