How to add ubuntu 12.10 entry to grub menu list? - ubuntu-12.10

I removed my ubuntu 12.10 entry while editing menu.lst file.
can anyone give me a sample file containing the ubuntu 12.10 entry in menu.lst file.
It should be something like this:
title Ubuntu 12.10
kernel
initrd
my ubuntu installation is on sda6.
can anyone help me on this?

Assuming that you're using Grub2 per my comment above and have not installed a non-default bootloader, here is an example menu entry from /boot/grub/grub.cfg:
menuentry 'Ubuntu, with Linux 3.5.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 862e9bd8-8641-478a-96a3-d5ad9a53b104
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=862e9bd8-8641-478a-96a3-d5ad9a53b104 ro find_preseed=/preseed.cfg noprompt quiet
initrd /boot/initrd.img-3.5.0-23-generic
}
As you can see, the root drives are set via uuid, so cutting and pasting a solution will not work for you.
However you can try the Boot-Repair utility, or follow these instructions.
If you have installed an older version of grub this blog post gives some examples you may find useful.

Related

libxkbcommon.so.0: no version information available after installing VSCode update

I am using Ubuntu 14.04 LTS. After updating VSCode to v.1.53.0 I am getting following message on opening VSCode:
/usr/share/code/bin/../code: /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0: no version information available (required by /usr/share/code/bin/../code)
On giving command code --verbose I get following logs: logs
I cannot update current Ubuntu version due to limited admin rights.
If you run code --verbose you will see real problem:
[main 2021-04-16T11:44:45.671Z] Main->SharedProcess#connect
/usr/share/code/code --verbose --no-sandbox: relocation error: /usr/share/code/resources/app/node_modules.asar.unpacked/spdlog/build/Release/spdlog.node: symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
It can't find symbol basic_string::compare
echo _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc | demangle
So to run visual studio code on Ubuntu 14.04 LTS
You just need to copy libstdc++.so.6.0.28 and libstdc++.so.6
to /usr/share/code from ubuntu 20.04 LTS
You can get libstdc++.so.6.0.28 (md5=0e7d34a60136c0cd150917ed099980f2) for example from this deb file
Here simple script to do it for you
#!/bin/sh
wget https://mirrors.wikimedia.org/ubuntu/ubuntu/pool/main/g/gcc-10/libstdc%2B%2B6_10.2.0-5ubuntu1~20.04_amd64.deb
dpkg-deb -R libstdc++6_10.2.0-5ubuntu1~20.04_amd64.deb .
sudo cp -P usr/lib/x86_64-linux-gnu/* /usr/share/code/
file version changed in wikimedia.org so new script:
#!/bin/sh
wget https://mirrors.wikimedia.org/ubuntu/ubuntu/pool/main/g/gcc-10/libstdc%2B%2B6_10.3.0-1ubuntu1~20.04_amd64.deb --no-check-certificate
dpkg-deb -R libstdc++6_10.3.0-1ubuntu1~20.04_amd64.deb .
sudo cp -P usr/lib/x86_64-linux-gnu/* /usr/share/code/
md5sum of new libstdc++.so.6.0.28 604ec2999aeb3aadd0e96103fd4b5e5d
Then just type code
ps: very good font for vscode JetBrains Mono
I downgraded my VSCode to lower version. Apparently you can access previous versions of VSCode from it's website but the link's font was too big form me to see.
Still if someone does come across any other alternative please share.
Leaving this here for others.

Raspbian Jessie: Cannot mount NTFS external harddrive anymore after 'apt-get upgrade' (fuse device is missing)

After I used apt-get upgrade earlier today, my Raspberry Pi (Raspbian Jessie) stopped being able to automount my external harddrives anymore. Automounting worked perfectly fine before apt-get upgrade, but now I can't even manually mount my external HDDs anymore.
This is the error message I received:
pi#raspberrypi:~ $ sudo mount /dev/sda1 /mnt
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root
'modprobe fuse' gives me the same error message:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
I reinstalled the kernel and bootloader using this command:
sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
But this did not help.
From reading other forum posts, it may look like my kernel and fuse might not be compatible - but how would that have happened? I feel I'm a bit out of my depth here.
Some forum posts suggested a restart will help, but this didn't solve the issue for me.
Alternatively, I also found a post from drownboat on Reddit from two years ago that looks promising - but to be honest, I have no idea if this is just another red herring or if this is indeed the problem I'm facing. In any case, I'm not sure what exactly/how drownboat did it:
I suspect that what is happening is that updates to the kernel and
grub config are being written to the /boot folder, but not onto the
boot device. This has caused the modules and the kernel to go out of
sync. [...]
I fixed it by adding /boot back to /etc/fstab, rebooting to another kernel where the modules were still working, thus mounting /boot, and finally reinstalling apt-get install --reinstall linux-image-3.16.0-4-amd64.
I would greatly appreciate any help!
Some more info:
uname -a
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016
armv7l GNU/Linux
dpkg -s fuse
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 103
Maintainer: Laszlo Boszormenyi (GCS)
Architecture: armhf
Version: 2.9.3-15+deb8u2
Depends: libc6 (>= 2.4), libfuse2 (= 2.9.3-15+deb8u2), adduser, mount (>= 2.19.1), sed (>= 4), udev | makedev
Conffiles:
/etc/fuse.conf 298587592c8444196833f317def414f2
Description: Filesystem in Userspace
Filesystem in Userspace (FUSE) is a simple interface for userspace programs to
export a virtual filesystem to the Linux kernel. It also aims to provide a
secure method for non privileged users to create and mount their own filesystem
implementations.
Homepage: http://fuse.sourceforge.net/
I FOUND THE SOLUTION (see further below for details)! It turned out that the boot partition was not mounted and the operating system reverted to the old kernel before the apt-get upgrade. So I just had to make sure that /boot was automounted at startup so the correct kernel was used.
Further steps in my error analysis ():
OK so I managed to fix the issue myself. It really just turned out that the /boot partition was not mounted and thus my Raspberry Pi reverted to the old kernel instead of the fancy new one that came with apt-get upgrade.
I found the problem by using uname -r, which gave me '4.9.35-v7+' as an answer. This was strange because the original error message had a different version number:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could
not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
(My emphasis)
When I navigated to /lib/modules using cd /lib/modules I also saw this:
pi#raspberrypi:/lib/modules $ ls
4.9.35+ 4.9.35-v7+
So the error message about a fuse device missing really seemed to have something to do with a mismatch of kernel and fuse versions. The discrepancy between version numbers led me to believe that the wrong kernel was being used (like drownboat also stated in their Reddit post two years ago).
This is how I fixed the problem (SOLUTION):
sudo nano /etc/fstab/
Then I added the following lines to fstab:
# automount /boot partition at startup
/dev/mmcblk0p6 /boot vfat defaults 0 2
After rebooting, I used sudo raspi-config to check if the boot partition was mounted properly (raspi-config will only let you enter its menu if the partition is mounted, otherwise it will tell you that you need to mount the boot partition first).
Then I ran sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel again to doubly ensure that the latest kernel was installed on the boot partition too - but I don't know if this was a crucial step.
Finally, after another restart, I was able to mount/automount my external harddrives again.
Hope this helps anyone else out there having the same issue as me! :)
In my situation, the solution is pretty simple.
I run apt update and apt upgrade -y and then apt install ntfs-3g, after these, I try to mount the disk and met this error.
The solution is just reboot
After reboot, try to mount again, and thing worked well.
I had the same issue trying to get Open Media Vault working. There were missing or unmatched kernel files, outdated libraries etc. I ran the updates in the link below and got it working.
Update system's package list
sudo apt-get update
upgrade all installed packages to their latest versions:
sudo apt-get dist-upgrade
https://www.raspberrypi.org/documentation/raspbian/updating.md
I had this problem trying to mount a FAT32 USB on Buster Lite with
pmount /dev/disk/by-label/<my-usb-label>
The messages implied the system was trying to mount an ntfs device. 'NTFS signature missing' etc.
Before trying anything clever, I tried #Kenneth's suggestion of a reboot. It fixed the problem.
Worrying to see Linux behaving like Windows 8-{
Crash after kernel upgrading
apt-get update & dist-upgrade
impossible to mount ntfs usb disk
modprobe: FATAL: Module fuse not found in directory /lib/modules/5.15.87-v7+
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root
Thanks a lot for this workaround :
sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel

The JDK is missing and is required to run some NetBeans modules

Complete error message:
The JDK is missing and is required to run some NetBeans modules
Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.
Some details: I just installed Netbeans on Linux mint for the first time and when I start it when its turning on modules this error message appears. But I do have jdk installed.
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
$ javac -version
javac 1.8.0_66
Find the file [netbeans installation directory]/etc/netbeans.conf
Luckily, Linux has a find helper like
find /home/ -name "netbeans.conf,
in which you can change the /home/ to a location where you want to search.
I found it at /usr/local/netbeans-8.1/etc/netbeans.conf
Once, you found the file, the following property needs to be set:
netbeans_jdkhome="[jdk_path]"
where you can find the jdk_path using:
update-alternatives --config java
In my case, I found it at /opt/java/jdk1.8.0_191
[Solved] For Mac OSX 10.11 (El Capitan).
Solution may be similar for other Unix-based systems.
The problem may have occurred because I inadvertently installed the jre
prior to installing the jdk. I uninstalled the jre, installed the jdk
and reinstalled NetBeans but the problem (popup window) remained.
However, the fix was fairly simple.
1. Make sure NetBeans is not running.
2. Make sure the jdk is installed.
3. Determine the location of the jdk:
The jdk location can be determined by entering the following (in Terminal):
$ /usr/libexec/java_home
For my system, the output was:
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
4. Edit the NetBeans configuration file to indicate the location of the jdk.
Near the bottom of this Netbeans configuration file (or equivalent for your NetBeans version):
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Comment out the following line (insert a # before the first character):
#netbeans_jdkhome="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/bin/jre"
Then, add the following line (or equivalent for your jdk version):
netbeans_jkdhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home"
Then, save and exit the editor.
5. Start NetBeans (no more popup window indicating that the jdk is missing).
When netbeans has problems trying to find the path of the jdk, it's mainly because the version of the jdk does not match. Open the file C:\Program Files\NetBeans 8.2\etc\netbeans.conf, and verify that netbeans_jdkhome = "C:\Program Files\Java\jdk1.8.0_111".
Open netbeans.conf
sudo nano "/usr/lib/jvm/java-8-oracle/netbeans.conf"
Set proper sdk path:
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
Exit Ctrl + X and to save changes Ctrl + T
This error showed up when I updated the Mac to Mojave. To fix, I edited the netbeans.conf file with the current jdk by using Terminal to find the correct jdk. Type
/usr/libexec/java_home -V
Here was my output.
Matching Java Virtual Machines (4):
1.8.311.11 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_131 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
1.8.0_25 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
1.7.0_79 (x86_64) "Oracle Corporation" - "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Entering the first jdk listed did not work.
I edited the conf file with the second one listed:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"
Restarted Netbeans. That fixed it.
This worked for me
1. install full JDK
2. either edit <netbeans-IDE-installation>/etc/netbeans.conf
2.1 unmark netbeans_jdkhome
2.2 link to JDK location e.g. /usr/local/share/java/jdk1.6.0_07/
3. or use --jdkhome command-line option e.g. ./bin/netbeans --jdkhome /usr/local/share/java/jdk1.6.0_07/
take care with the "/" at the end
More info in http://wiki.netbeans.org/FaqRunningOnJre
Ubuntu 16.04 LTS:
Uninstall the netbeans you have.
Delete .cache/netbeans folder
Download http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
Install your download
I have this problem to. But now i resolove this problem with edit one line.
Find and open this file /etc/netbeans.conf
If you see netbeans_jdkhome="C:\Program Files\Java\jre1.8.0_151" replace netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_131"
Save as adminstrator
Problem reseloved
In mid April 2019, Oracle has changed the JDK's licence. However, I was still able to solve this issue with NetBeans 11 and the JDK 12's open source build on my Windows machine. Just downloaded the open source JDK from https://jdk.java.net/ and extracted it. Then, in my NetBeans config file, I typed in the path to the extracted directory (NOT the "bin" folder!).
I resolved this problem by changing default version of JRE and JDK that I'm using to 11.x.x with following commands:
sudo update-alternatives --config java
sudo update-alternatives --config javac

How to install Oracle JDK 7 and Netbeans IDE in Linaro 13.01 ubuntu tty1?

I have a Processor A13(cpu: cortex-A8 ARM v7) of allwinner and my OS is Linaro 13.01 Ubuntu tty1.
So how do I install Oracle JDK7 and Netbeans IDE on that?
If you're using Ubuntu, there are several ways to install NetBeans. One way is to use Ubuntu's "Software Centre" which you can use just to search to NetBeans and it should install it including all dependencies.
You can also use your web browser in Ubuntu and head to www.netbeans.org and click "Download" at the top right, there you can choose your operating system and download the correct version of NetBeans.
Once downloaded you can run the NetBeans installer through terminal using: sh ./<NetBeans file name here>. And the installer will start.
To install Open JDK:
However, you may need to download and install the JDK first; which you can also do in terminal by typing: sudo apt-get install openjdk-7-jdk.
To install Oracle JDK:
This is taken from this link: http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux
Remove open JDK from your system: sudo apt-get purge openjdk-\*
Create a new directory for the oracle JDK: sudo mkdir -p /usr/local/java
Download the Oracle Java JDK for linux by clicking here
Copy the Oracle Java binaries to the /usr/local/java directory: cd /home/userName/Downloads, sudo -s cp -r jfk-7u13-linux-x64.tar.gz /usr/local/java, cd /usr/local/java.
Extract the file: sudo -s tar xvzf jdk-7u13-linux-x64.tar.gz
Edit the system path file: sudo nano /etc/profile
Scroll to the bottom of the file and add this:
JAVA_HOME=/usr/local/java/jdk1.7.0_13
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Save the file and exit (Ctrl+X), then enter "y" for nano.
Let Ubuntu know where the Oracle Java JDK is:
LOCN="/usr/local/jdk7"
sudo update-alternatives --install "/usr/bin/java" "java" "${LOCN}/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "${LOCN}/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "${LOCN}/bin/javaws" 1
Make sure Ubuntu knows to use this as the default JDK:
sudo update-alternatives --set java ${LOCN}/bin/java
sudo update-alternatives --set javac ${LOCN}/bin/javac
sudo update-alternatives --set javaws ${LOCN}/bin/javaws
Reload system path: /etc/profile, or just restart.
If you have trouble following my instructions then take a look at the link I posted above.
I would recommend using Open JDK instead though, as you can see; it's much easier to install.
I hope this helps.
Install Oracle JDK for ARM processor and Hard Float OS Image is here.
Oracle JDK for ARM Processor
And download Netbeans IDE 7.0.1 for Linux and install it.
Not to spoil your fun, but the A13 is a very weak SOC for this task.
I wouldn't even try anything below dual Cortex A15 with 2GB RAM (The Samsung XE303).
Oracle now releases the standard JDK8 for ARM Linux hardfloat so it is possible to install it on Debian/Ubuntu fairly easily:
Get JDK8 from Oracle's webpage (currently early access)
Extract th tar.gz-d JDK8 ARM/LInux/hfloat into /usr/lib/jvm/jdk1.8.0
Use update-alternatives (first answer)
Run "java -version" to check the results
..voila
I learned from Digital Ocean Docs how to manually install Oracle JDK on a headless ubuntu.
With a bit of Googling, I found following script to be useful.
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz

netbeans installation error: can't initialize ui running in headless mode

I'm trying to install NetBeans on Linux Mint, and I'm getting the following error every time I run the installation script:
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
Can`t initialize UI
Running in headless mode
What should I do to get it working?
In case anyone has this problem in the future, Netbeans doesn't like OpenJDK 6 but -- fortunately -- it works fine with OpenJDK 7 (as expected as for Java 7 OpenJDK is the reference implementation). Just make sure you remove any Java 6 packages before installation attempts. On Ubuntu and Mint one can do:
sudo apt-get purge ^openjdk-6-*
sudo apt-get install openjdk-7-jdk
It should work afterwards.
Looks like Netbeans does not work properly with Openjdk. This is what I did (in Linux Mint 12):
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
Then you will be able to run the .sh installer as usual.
I hit this same issue on Kubuntu 12.04 LTS but needed Sun JDK 6 for a project I'm maintaining. I stumbled upon Martin Wimpress' OAB-Java script (by way of help.ubuntu.com) which creates and installs a local apt repository for Sun JDK 6. You can find the latest instructions on Martin's github site which run as follows:
cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.7/oab-java.sh \
-O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh
If you want to see what this script is doing while it is running then execute the following from another shell:
tail -f ./oab-java.sh.log
Alternatively, you can clone the OAB-Java repo and kick of the script from within it:
git clone git://github.com/flexiondotorg/oab-java6.git
cd oab-java6
sudo ./oab-java.sh
Either way, once that is in place follow Jose's instructions to remove openjdk and install sun jdk:
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
One final note, the script accepts a -7 argument which will create and install a local apt repository for Oracle JDK 7 should you want to go that route.
I was able to get it to work by getting into the target system using ssh -X, then making sure DISPLAY was exported. That handles the X server issues.
Change the priority of the Oracle Java executables:
export PATH=/usr/java/latest/bin:$PATH
Run the installer:
./netbeans-8.1-linux.sh
What worked for me was installing default java environment from the terminal:
sudo apt-get install default-jre
The installation was a success - under "user".
The installation failed - under "su" (under Red Hat equivalent of "sudo"). With
Can`t initialize UI
Running in headless mode
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
For me.