Tuesday, May 27, 2008
mount CD in ubuntu
* Read #General Notes
e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
* To mount CD/DVD-ROM
sudo mount /media/cdrom0/ -o unhide
* To unmount CD/DVD-ROM
sudo umount /media/cdrom0/
How to forcefully unmount CD/DVD-ROM manually
* Read #General Notes
e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
sudo umount /media/cdrom0/ -l
Thursday, May 22, 2008
super grub disk
see:-http://supergrub.forjamari.linex.org/
How to restore Grub from a live Ubuntu cd.
How to restore Grub from a live Ubuntu cd.
This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.
(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)
Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.
Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.
THIS IS AN EDIT. 5-HT MADE A GOOD POINT AND I AM JUST GOING TO COPY/PASTE IT HERE
Quote:
Just have recommendation to add that may be irrelevant: it might be of benefit to give an explicit warning (though it is mentioned) that this guide will write GRUB to the MBR (just in case someone is using a different boot loader on their MBR and would like to reinstall GRUB to a partition).
If someone wants GRUB on a partition, the 'setup (hd0)' step can be modified to 'setup (hdX,Y)'. Where X is the hard disk, and Y the partition using GRUB's nomenclature of starting from 0 (first partition=0, second=1,...).
THIS IS ANOTHER EDIT. TOSK POSTED A WAY TO MOUNT PROC AND UDEV. THIS WAS NEEDED BECAUSE GRUB WASN'T RECOGNISING THE DRIVE. I THOUGHT IT WAS A VALUABLE COMMENT AND DECIDED TO PUT IT IN THE ORIGINAL POST SO PEOPLE WILL SEE IT AT THE TOP. IT MAY BE MISSED AS JUST A REPLY POST DOWN THE PAGE. ALL KNOWLEDGE IS WELCOME!
Quote:
Mine was a slightly different story. I couldn't get grub to find the stage1 file or even recognize my drive. So I borrowed some knowledge I picked up while using Gentoo:
You have to mount your root partition using the livecd:
Code:
$
Code:
sudo mkdir /mnt/root
$
Code:
sudo mount -t ext3 /dev/sda6 /mnt/root
Then you have to mount the proc subsystem and udev inside /mnt/root also:
Code:
$
Code:
sudo mount -t proc none /mnt/root/proc
$
Code:
sudo mount -o bind /dev /mnt/root/dev
Doing this allows grub to discover your drives. Next you have to chroot:
Code:
$
Code:
sudo chroot /mnt/root /bin/bash
Now that you're chrooted into your drive as root everything should work.
Code:
#
Code:
sudo grub
I edited in the sudo, just to be safe. When I enter grub and not sudo grub, grub cannot find the file. I do not know if the chroot changes this because I did not try it that way. In the end I figured it was better to err on the side of caution. Tosk I hope you don't mind my editing of your reply.
grub>
Code:
find /boot/grub/stage1
It found mine on (hd0,5)
Code:
grub>
Code:
root (hd0,5)
It successfully scanned the partition and recognized the filesystem-type
Code:
grub>
Code:
setup (hd0)
That was it. It installed and on reboot I was thrown back into Ubuntu.
This might help some people who are having issues so I thought I would post it.
PLEASE NOTE: My Ubuntu was installed to /dev/sda6. This may not be the same for everyone. /dev/sdaX means it's SCSI/SATA/USB/FireWire drive. And it's partition 6 because I have a weird partitioning scheme in place.
--Tosk
**This set of instruction is a combination of 2 guides I saw before. One was a Mepis grub how to but I never found it again. The other is the grub manual. It's section explained the find, root, setup process but never mentioned it could be done from a live session.
This is the grub link http://www.gnu.org/software/grub/man...-GRUB-natively
Post script;
Just to post as much information as possible, this is an older how to for resoring grub to the mbr. The original post is directions for using the install cd and then there are replies that mention the method I posted here, as well as the chroot method mlind mentioned. If this method fails, you may want to try this
http://ubuntuforums.org/showthread.php?t=24113
mlind
This looks very useful info. Is the result same as running grub-install /dev/xxx ?
catlett
The end result is the same but grub-install /dev/hd? doesn't work with a live cd. When I run grub-install from a live cd, I get an error about grub not being able to read the bios.
When I first installed ubuntu there was a grub re-install guide. It said something about mounting the ubuntu partition. Then cd to the directory and chroot. At the time it was over my head and I didn't pay much attention to it. Now I can't find it.
The other guide was the Breezy guide where you trick the install cd into re-installing grub.I gues it worked for people but I thought there had to be a simpler way to do it.
I finally found the grub manual entry on native installs and tried it from a live cd and it worked.Hopefully reinstalling grub will now be a simple thing to do from a live cd.
mlind
Re: How to install Grub from a live Ubuntu cd.
You probably mean something like this as root
Code:
mkdir /mnt/root
mount /dev/xxx? /mnt/root
chroot /mnt/root /bin/bash
grub-install /dev/xxx
Thanks for your HOWTO though, I'll try it next time I screw up my grub. Which is probably at weekend when I testdrive Edgy.
catlett
Please try the chroot grub-install and post what happens. Like I said I saw the how to when I didn't understand commands and never saw it again. Then I saw the grub manual describing the find, root, setup commands and I went with that.I think find, root, setup doesn't return the bios error because they are given from the grub shell.
Just for FYI, this is the error I get with grub-install from the live session.
Code:
ubuntu@ubuntu:~$ sudo grub-install /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Could not find device for /boot: Not found or not a block device.
This is the output of find, root, setup
Code:
grub> find /boot/grub/stage1
(hd0,1)
(hd0,10)
grub> root (hd0,10)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,10)"... failed (this is not fatal
)
Running "install /boot/grub/stage1 d (hd0) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.
catlett
Just wanted to post with more concrete proof. I knew it was right from the documentation and I got feedback from one success story plus I ran it but it was just replacing the same list so it was hard to tell.
BUT NOW, I have absolute proof. I just installed Fedora Core 5 yesterday. I allowed Fedora to install grub. Fedora's grub didn't recognise Ubuntu's installation.
I thought to myself, Perfect! Lets put the guide to work. This is just the scenario I was hoping to help people with. You had grub but lost it to another install (or another issue that caused grub to return an error or what not. The main thing is that grub is already installed somewhere. The issue is you can't access it)
This is actually how anyone could handle this. I copied down Fedora's grub entry , then I rebooted and put the Ubuntu Live installation cd. When I got to the desktop I opened the terminal and did the 4 commands. One from the regular ubuntu terminal and 3 at the grub shell.
Code:
sudo grub
then at grub>
Code:
find /boot/grub/stage1
It returned 2 listings, hd0,2 and hd0,6. I forgot Ubuntu's root partition believe it or not but I knew I just put Fedora on /dev/hda3 (that is hd0,2 to grub)
Now that I know Ubuntu's grub is on hd0,6 I let the grub shell know what grub files I wanted to use
Still at grub>
Code:
root (hd0,6)
Now the command to install grub on the mbr with hd0,6's grub files
Code:
setup (hd0)
Grub then prints a little read out in the terminal about how it found the kernel and everything else until it says "succeeded". Now all I have to do is get out of the shell
grub>
Code:
quit
Then I shutdown Ubuntu and restarted the computer.
Gone was Fedora's grub and in it's place was my Ubuntu grub menu. Success.
(As for accessing Fedora, I just inserted the Fedora entries I copied from Fedora's grub before I booted the live cd. Now I have Ubuntu's grub back and it is booting to fedora.)
To sum up, hd0,6's grub installed flawlessly on the mbr. It took all of 2 minutes from putting the cd in to restarting.
Here it is again just to put it to bed.
Code:
sudo grub
Code:
find /boot/grub/stage1
whatever the find command returns use for root
Code:
root (hd?,?)
Code:
setup (hd0)
hd0 is the mbr of the first drive (as far as grub is concerned)
Code:
quit
5-HT
Thanks for the HowTo!
Just have recommendation to add that may be irrelevant: it might be of benefit to give an explicit warning (though it is mentioned) that this guide will write GRUB to the MBR (just in case someone is using a different boot loader on their MBR and would like to reinstall GRUB to a partition).
If someone wants GRUB on a partition, the 'setup (hd0)' step can be modified to 'setup (hdX,Y)'. Where X is the hard disk, and Y the partition using GRUB's nomenclature of starting from 0 (first partition=0, second=1,...).
source:-http://ubuntuforums.org/showthread.php?t=224351
see also:-
http://ubuntu.wordpress.com/2005/10/20/backing-up-the-mbr/
http://ubuntuforums.org/archive/index.php/t-24113.html
http://ubuntuforums.org/showthread.php?t=224351
http://www.arsgeek.com/?p=655
https://help.ubuntu.com/community
/RecoveringUbuntuAfterInstallingWindows
BSNL broad band connection in ubuntu
Here are the things to do to get DataOne working on Linux:
- Plug in a LAN card and make sure that the required driver
is present in the kernel, either compiled-in or loaded as a module. - Connect the router to the ethernet card.
- Assign an IP address for the ethernet card; the router has a
fixed interface address of 192.168.1.1, so you can use 192.9.168.2
for your ethernet interface. Just do `ifconfig eth0 192.168.1.2′. - Set up the route - just do `route add default gw 192.168.1.1′.
- Enter the address of some DNS servers in /etc/resolv.conf (
eg: 61.1.96.69, 61.1.96.71) - Try doing a `ping www.google.co.in’. If it works, great! If
not, check whether it is some problem with the DNS settings by
pinging a machine with the I/P address rather than the name. If
that too doesn’t work, you will have to do some configuration on
the router. - You can access the router via a browser - just enter the
I/P address 192.168.1.1. You basically have to set the connection
type to `PPPoE’; on my MT880 box, this comes under `WAN Settings’.
You will then have to enter your user name and password (username is
of the form xyz@dataone) and reset the router. It will take 2-3
minutes for the box to come up again - when it comes up, it will
`automagically’ talk with the box at the exchange (via PPP?) and
will be assigned a proper IP address. You need not bother about this
address as you always see the router at a fixed address of 192.168.1.1. - Try pinging google.com again - it should work! You are now on
DataOne!
I am getting connection speeds of about 190Kbps consistently; that
should be OK, given the distance. Some of my students who are staying
near the telephone exchange report that they are even getting speeds
greater than the promised 256Kbps!
source:-http://pramode.net/2005/07/30/782/
See:-
http://www.ubuntu-in.org/wiki/Broadband_Howto
removing kernel-images in ubuntu
"aptitude remove(purge, I like) linux-image-2.6.20-15-386-generic" or whatever the name is.
Once you removed what you want, I think just running "sudo grub-update" will take care of menu.list located in /boot/grub/ and you shouldn't have to edit the file.
Bench marking your ubuntu system
Find hardware specifics/details on your computer
sudo lshw -html > your-file-name.html
make sure that u have lshw package intalled then issue the above command
swift fox installation in ubuntu
1. Add the repository to /etc/apt/sources.list
deb http://getswiftfox.com/builds/debian unstable non-free
2. Install from a terminal window as root using the correct package name:
apt-get update && apt-get install swiftfox-athlon-xp
Package names are based on the specific architecture and can be found here. If you are not sure which architecture you need for your processor this chart should help.
Instructions for manual installation
1. Download the appropriate deb file for your computer
2. Open a terminal window
3. Install the deb file by typing the following:
sudo dpkg -i swiftfox_3.0b5pre-1_pentium4.deb
The file name will vary depending on which one you download.
4. Launch Swiftfox by selecting it from the menu or by typing swiftfox in a terminal.
see:-http://ubuntuforums.org/showthread.php?t=142798
Get a list of installed packages in Ubuntu for reinstallation on another system
Published on November 25, 2007 in GNU/Linux. Ubuntu.
How do you get a new Ubuntu (or Debian or any distro using dpkg) installation to quickly have a specific set of packages installed without scouring through the list of packages and selecting packages one by one? More specifically how do you get a new Ubuntu installation (the target system) to have the same packages as your current one (the source system)?
Solution
Step 1: Configure and enable one or more repositories on the target system so that all repositories available in the source system are available in the target system. This Ubuntu help article - Adding Repositories in Ubuntu” - has more info on how to do it. Remember to add any non-standard repositories (for e.g. Google repositories) in addition to the standard ones.
https://help.ubuntu.com/community/Repositories
/Ubuntu#head-a86dddc6826cec4a3847d8441b24051d07b8dc64
Step 2: Get a listing of the packages currently installed on the source system using the following command.
sudo dpkg --get-selections | cut -f1 > installed-packages.txt
Step 3: Use the following command to feed the list of packages into apt-get on the target system, wait for apt-get to download and install all the packages and voila! you are done.
cat installed-packages.txt | sudo xargs apt-get install
maximum-partitions in linux
There can be a maximium of 4 primary partitions.One of the Primary can be an extended.
Which can contain as many partitions as you desire. No limit, except for the size of the medium.
No difference between ide and scsi as far as number of partitions go.
jens
It's limited cause of the amount of partition devices the kernel can make and use.
Last time I checked:
IDE: Max 63 (4 primary/extended and 59 logical)
SCSI: Max 11 or 27
borromini
Do not take this as Windows bashing, but Windows can only make 26 partitions normally (letters of the alphabet). That would imply not using any floppy, cd-rom or other device.
sf433
I found from text book, It was printed a few years ago. I am not sure it is absolutly correct.
max of partittion for ide = 63
max of partition for scsi = 15
a) but I don't know how to calculate,
For each hd, let say hda, max of partition are
hda1-primary
hda2-primary
hda3-primary
hda4-extended
hda5-logical
hda6-logical
hda7-logical
hda8-logical
total: max 8 partitions per each hd
if max of hd is 8, it should be 8x8= 64 partitions, why there is only 63? where is the other one?
b) scsi is only 15 ? only 2 scsi(how could it be)? 2x8= 16 partitions? where is the other one?
c) It looks like a simple question, but I really want to get a right concept from basic again.
budman7
I think you are getting the hard drives and partitions mixed up. 63 ide hard drives(that is a lot of controllers) and 15 scsi. I believe you can chain 127 usb devices together, making them all hard drives.I personally have 10 partitions on my120 GB hard drive.
Off topic
Quote:
Do not take this as Windows bashing, but Windows can only make 26 partitions normally (letters of the alphabet). That would imply not using any floppy, cd-rom or other device.Actually Windows can only make 23 partitions. One primary and one extended that can have 22 logical
C: is primary
A: is dedicated to floppy
B: is dedicated to floppy(how stupid is that)
D: would be the extended that holds all the logical
jens
Originally written by sf433
why there is only 63
Cause 63 is simply the the maximum amount of partition devices the kernel can make on an IDE drive and use. Their's no other reason (in Linux the firts 4 are reserved for primary/extended, leaving maximum 59 partitions as logical).
*************************************************************************************************
khakisheep
Need to clarify something. On another forum I'm encountering some people saying that with Linux it can only handle and or create and manage a maximum of 63 partitions? I am having trouble grasping this mystical '63' number I keep seeing. Can anyone here confirm this and explain it? And is there a workaround. I've always known and believed I could create as many logical partitions as I wanted, maxing at like 255 or something. Is this a Linux exclusive situation or what?
Users at other forum weren't too helpful with this matter, they basicly said try to push past 63 and see what happens. Well in a perfect world I could, but I have a deadline for this project at work and cannot get to 63 and then have my project flounder and die. I need work-arounds, confirmations etc, if anyone can. Many thanks ahead of time.
Someone mentioned creating individual kernel modules as a workaround to creating hundreds of partitions for my project. Can anyone shed light on this as well.
jobeard
the answer is likely to be in the size of the programming structure that holds the memory copy of the actual partition table.remember, each physical HD has one partition table holding all the mappings for that HD.this will result in a hierarchy of HD[x]->part[y]->filesys-info
such limits are ususally powers of 2, so expect 32,64,128, ...
If you have access to Lunix source, you can find the answer there.
jobeard
Linux manpage 8 fdisk clearly states
IDE max 63, SCSI max 15,
see also /usr/src/linux/Documentation/devices.txt
Mictlantecuhtli
Taken from Linux kernel documentation (not sure how up to date it is):
3 block First MFM, RLL and IDE hard disk/CD-ROM interface
0 = /dev/hda Master: whole disk (or CD-ROM)
64 = /dev/hdb Slave: whole disk (or CD-ROM)
For partitions, add to the whole disk device number:
0 = /dev/hd? Whole disk
1 = /dev/hd?1 First partition
2 = /dev/hd?2 Second partition
...
63 = /dev/hd?63 63rd partition
For Linux/i386, partitions 1-4 are the primary partitions, and 5 and above are logical partitions.
Other versions of Linux use partitioning schemes appropriate to their respective architectures.
The documentation also includes only ten IDE hard disk / CD-ROM interfaces, so the devices would go from hda to hdt only (master & slave).
tdeg
I guess the big question is why do you need more than 63 partitions?
Can't you just use a few partitions and then different mount points?
Are you trying to have a computer with every type of possible filesystem or something?
khakisheep
I suppose I could have just a few partitions and then different mount points...but again, this is my first experience with Linux. And my reason for coming to these forums was to get advice on how to go about this task and learn from people who may already know how to do what I'm attempting to do. So again, my task is a SINGLE HDD with the possibility of installing/booting an individual set of software drivers for 150+ motherboards.
They cannot annoy and touch one another, my only thoughts were seperate partitions with seperate installations of an OS.
I don't care how its done, or what methods I have to use. For ease on our technicians I'm trying to accomplish this with windows but not having any luck. Linux seems to be offering me the solutions I need but straight answers are what I'm needing but aren't receiving. I'm attempting to research all suggestions that you guys mention, but for a noob its proving difficult at best to answer questions of why I don't try this, when its not an option I ever knew existed.
If you have a suggestion PLEASE by all means continue to post them.
Examples are nice! Here's something that might work, you may want to read about this and try this. etc. etc.
nodsu
How about some virtual machine solution like VMWare or xen?
Or mounting files (loop device) as / for different incarnations of Linux at boot?
open source directories repositories
http://osalt.com
http://winlibre.com
http://ostatic.com
Ubuntu graphical errors while installing
if there is any graphical problem then try this
install from the boot prompt try this
boot: install acpi=off vga=771 noapic nolapic hw-detect / start_pcmcia = false
for more info when u boot from ubuntu cd
menu will be shown with, at the bottom it is written F1 help F2 language ......
try pressing F6 and read all possible error conditions and their solutions
then i think it is the esc key to get the boot: prompt
then install from there
Linux Boot Sequence
2) Master Boot Record (MBR)
3) LILO or GRUB
4) Kernel
5) init
6) Run Levels
1) BIOS
Load boot sector from one of:
Floppy
CDROM
Hard drive
The boot order can be changed from within the BIOS. BIOS setup can be entered by pressing a key during boot up. The exact key depends varies, but is often one of Del, F1, F2, or F10.
2)(DOS) Master Boot Record (MBR)
DOS in the context includes MS-DOS, Win95, and Win98.
BIOS loads and execute the first 512 bytes off the disk (/dev/hda)
Standard DOS MBR will:
look for a primary partition (/dev/hda1-4) marked bootable
load and execute first 512 bytes of this partition
can be restored with fdisk /mbr from DOS
3) LILO
does not understand filesystems
code and kernel image to be loaded is stored as raw disk offsets
uses the BIOS routines to load
Loading sequence
load menu code, typically /boot/boot.b
prompt for (or timeout to default) partition or kernel
for "image=" (ie Linux) option load kernel image
for "other=" (ie DOS) option load first 512 bytes of the partition
Reconfiguring LILO
One minute guide to installing a new kernel
copy kernel image (bzImage) and modules to /boot and /lib/modules
edit /etc/lilo.conf
duplicate image= section, eg:
image=/bzImage-2.4.14
label=14
read-only
man lilo.conf for details.Click here for manpage of lilo.conf
run /sbin/lilo
reboot to test
GRUB
Understands file systems
config lives in /boot/grub/menu.lst or /boot/boot/menu.lst
4)Kernel
initialise devices
(optionally loads initrd, see below)
mounts root filesystem
specified by lilo or loadin with root= parameter
kernel prints: VFS: Mounted root (ext2 filesystem) readonly.
runs /sbin/init which is process number 1 (PID=1)
init prints: INIT: version 2.76 booting
can be changed with boot= parameter to lilo, eg boot=/bin/sh can be useful to rescue a system which is having trouble booting.
initrd
Allows setup to be performed before root FS is mounted
lilo or loadlin loads ram disk image
kernel runs /linuxrc
load modules
initialise devices
/linuxrc exits
"real" root is mounted
kernel runs /sbin/init
Details in /usr/src/linux/Documentation/initrd.txt (part of the kernel source).
5) /sbin/init
reads /etc/inittab (see man inittab which specifies the scripts below for manpage click here)
Run boot scripts:
debian: run /etc/init.d/rcS which runs:
/etc/rcS.d/S* scripts
/etc/rc.boot/* (depreciated)
run programs specified in /etc/inittab
6)Run Levels
0 halt
1 single user
2 Full Multi-User mode (default)
3-5 Same as 2
6 Reboot
Default is defined in /etc/inittab, eg:
id:3:initdefault:
The current runlevel can be changed by running /sbin/telinit # where # is the new runlevel, eg typing telinit 6 will reboot.
Run Level programs
Scripts in /etc/rc*.d/* are symlinks to /etc/init.d
Scripts prefixed with S will be started when the runlevel is entered, eg /etc/rc5.d/S99xdm
Scripts prefixed with K will be killed when the runlevel is entered, eg /etc/rc6.d/K20apache
X11 login screen is typically started by one of S99xdm, S99kdm, or S99gdm.
Run programs for specified run level
/etc/inittab lines:
1:2345:respawn:/sbin/getty 9600 tty1
Always running in runlevels 2, 3, 4, or 5
Displays login on console (tty1)
2:234:respawn:/sbin/getty 9600 tty2
Always running in runlevels 2, 3, or 4
Displays login on console (tty2)
l3:3:wait:/etc/init.d/rc 3
Run once when switching to runlevel 3.
Uses scripts stored in /etc/rc3.d/
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
Run when control-alt-d
source:-http://www.debianhelp.co.uk/boot.htm
How to install Oracle-Xe on ubuntu
- Add the following repository to your /etc/apt/sources.list:
deb http://oss.oracle.com/debian unstable main non-free
- Install the software using apt-get
sudo apt-get update
sudo apt-get install oracle-xe
- Add your login to the 'dba' group (where your login name is username)
sudo usermod -G dba -a username
------------------------------------------------------------------------------------------
Installing Oracle Database XE on Debian, Ubuntu, and Kubuntu
by Todd Trichler
What happens when you try to install Oracle Database XE Beta on a new Linux distribution? You learn a whole lot!
Updated August 2007 - LinuxWorld Mexico Installfest
In my day job I get to work with .rpm-based Linux distros quite a bit in the form of RHEL, SLES, and Asianux. Recently I noticed that the Oracle Database XE doc mentions support for Debian. My sum experience with this could best be described as vicarious, having never before installed Oracle on a .deb-based distro.
What follows is one man's walk through the technical steps to install the beta of Oracle Database XE on Kubuntu 5.10 Breezy, a Linux distro based on the .deb package format and KDE. The lessons learned and suggestions also apply to Debian, Ubuntu, and other .deb distros.
If you are interested in the "back story" about this journey from the various PHP developers and people who helped along the way, please read the sidebar.
Update (March 2006): With Oracle Database XE in production, it is even easier to install Oracle on Debian-based distros (thanks to Joel Becker).
There is now an apt-get repository up on oss.oracle.com for XE. Just add:
deb http://oss.oracle.com/debian unstable main non-free
to /etc/apt/sources.list and then:
# wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
# apt-get update
# apt-get install oracle-xe
'libaio' and 'bc' are in the repository, so dependancies will pull them in if the user doesn't have them. (Note: You will need to 'sudo' or have 'root' privileges to install XE.)
Catch-all disclaimer: These steps worked for me on my configuration; they might not work on yours.
1. Download an iso of Kubuntu Breezy version and burn an install disc.
2. Do a standard install of Kubuntu. When prompted on the partioning choose "Erase entire HD and use LVM".
3. Do not set any of the kernel parameters because the latest beta versions of XE are supposed to check the parameters and increase them if neccessary. (Note: If you are using an older beta you will want to check those; better still, download the latest version.)
4. Confirm that the pre-requisite (glibc and libaio equivalent) libraries are installed. On Kubuntu and Ubuntu they are called "libc6" and "libaio1". (I used Adept, the new GUI package management tool, to install libaio1; libc6 was already installed.) As Wim Coekaerts described in his podcast on the subject, currently you need to use Debian unstable to get the equivalent packages, but in the future with Debian sid they would just be included.
5. As _root_ began installing the latest available Oracle XE beta:
todd@kubuntu:~$ su -
root@kubuntu:~# cd /home/todd/Desktop
root@kubuntu:/home/todd/Desktop# ls
DapperDevStatus02-Feb-2006.pdf oracle-xe_10.2.0.1-0.060128_i386.deb trash.desktop
root@kubuntu:/home/todd/Desktop# dpkg -i oracle-xe_10.2.0.1-0.060128_i386.deb
Selecting previously deselected package oracle-xe.
(Reading database ... 58594 files and directories currently installed.)
Unpacking oracle-xe (from oracle-xe_10.2.0.1-0.060128_i386.deb) ...
This system does not meet the minimum requirements for swap space. Based on
the amount of physical memory available on the system, Oracle Database 10g
Express Edition requires 1006 MB of swap space. This system has 799 MB
of swap space. Configure more swap space on the system and retry the installation.
dpkg: error processing oracle-xe_10.2.0.1-0.060128_i386.deb (--install):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
oracle-xe_10.2.0.1-0.060128_i386.deb
root@kubuntu:/home/todd/Desktop#
Note: the default 799MB of swap on Kubuntu was not sufficient for XE to install. Currently if you have 512MB physical RAM, XE will want 1GB swapspace (as in my case on a Tecra9000); if 256MB physical RAM, XE will want 1.5GB swapspace. Fortunately, XE gave me meaningful error feedback. How would I add swapspace on the fly without re-partioning? I had no clue. Maybe there is a administrative GUI? No such luck.)
6. I did get a couple of command-line responses from some of my friends on how to get around this. Here is one that worked for me:
root@kubuntu:~# dd if=/dev/zero of=/swapfile bs=1M count=600
600+0 records in
600+0 records out
629145600 bytes (629 MB) copied, 2.1237 seconds, 296 MB/s
root@kubuntu:~# mkswap /swapfile
Setting up swapspace version 1, size = 629141 kB
no label, UUID=f267d443-106e-431e-a6e5-ec2c1ebb0a37
root@kubuntu:~# swapon /swapfile
Note: I would not recommend using these types of commands to add swap unless you either understand what they are doing, or you trust the person who has recommended the fix and they are familiar with your system. Better still, add enough swap to start with. Well placed sources tell me that by the time Kubuntu 6.04 Dapper goes production (April 2006?), this might not be an issue.
7. After I upped the swapspace it installed cleanly.
root@kubuntu:/home/todd/Desktop# dpkg -i oracle-xe_10.2.0.1-0.060128_i386.deb
(Reading database ... 62016 files and directories currently installed.)
Unpacking oracle-xe (from oracle-xe_10.2.0.1-0.060128_i386.deb) ...
Setting up oracle-xe (10.2.0.1-0.060128) ...
Oracle Database 10g Express Edition is not configured. You must run
'/etc/init.d/oracle-xe configure' as the root user to configure the database.
Executing Post-install steps...
8. Although it is installed at this point you still need to configure it :
root@kubuntu:/home/todd/Desktop# /etc/init.d/oracle-xe configure
Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database XE. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Pressto accept the defaults. Ctrl-C will abort. http://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html
Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password: (* make sure you remember this password *)
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]: y
Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"
root@kubuntu:/home/todd/Desktop#
9. At this point you can fire up Firefox http://127.0.0.1:8080/apex, login as 'system' with the 'password' you created during the install, and you should see the XE homepage:
-------------------------------------------------------------------------------------------
read
to run sqlplus from the command line:-
So long as your environment variables are set up correctly, all you should
need is to type sqlplus.
However, if you want to run this from another machine, that machine would need to have the Oracle client components installed on it.Additionally you would need to have tnsnames.ora file configured with the information about the database instance you want to connect to.
Environment variables to consider are:
ORACLE_HOME (location Oracle has been installed to)
ORACLE_SID (database that you want to connect to)
NLS_DATE_FORMAT (Format Oracle will display dates in)
Ensure that the PATH variable contains $ORACLE_HOME/bin
When you installed Oracle 10g Express Edition the install will have created a user
called oracle
Initial setup:
1. Change / set the password for that account: sudo passwd oracle
2. Log in as the oracle account: su - oracle
3. vi .profile:
Code:
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
export PATH=$ORACLE_HOME/bin:$PATH
Then when you login as oracle (su - oracle) your environment will be set
To gain admin access the the XE database
(created by default with Express Edition):
sqlplus '/ as sysdba'
alter user sys identified by newpassword;
How to Convert chm files to HTML or PDF files
HTML Help files are made with help authoring tools. Microsoft ships the HTML Help Workshop with supported versions of Microsoft Windows and makes the tool available for free download. There are also a lot of third-party help authoring tools available.
CHM files, known as Microsoft Compressed HTML Help files, are a common format for eBooks and online documentation. They are basically a collection of HTML files stored in a compressed archive with the added benefit of an index.
Under Linux, you can view a CHM file with the xchm viewer. But sometimes that’s not enough. Suppose you want to edit, republish, or convert the CHM file into another format such as the Plucker eBook format for viewing on your Palm. To do so, you first need to extract the original HTML files from the CHM archive.
This can be done with the CHMLIB (CHM library) and its included helper application extract_chmLib.
Install Chmlib in Ubuntu
sudo apt-get install libchm-bin
Convert .chm files in to HTML files
If you want to convert .chm files in to HTML files use the following command
extract_chmLib book.chm outdir
where book.chm is the path to your CHM file and outdir is a new directory that will be created to contain the HTML extracted from the CHM file.
Convert .chm files in to PDF files
First you need to install htmldoc. HTML processor that generates indexed HTML, PS, and PDF.HTMLDOC is a program for writing documentation in HTML and producing indexed HTML, PostScript, or PDF output (with tables of contents). It supports most HTML 3.2 and some HTML 4.0 syntax, as well as GIF, JPEG, and PNG images.
sudo apt-get install htmldoc
If you want to use htmldoc type the following command in terminal
htmldoc
Once it opens you should see similar to the following screen here you can choose the html file and convert them to pdf,ps
ubuntu search engine
find everything about ubuntu linux in a snap,
try the ubuntu search engine:-
http://www.ubuntux.org/ubuntu-search/
Only ubuntu sites
here is the list of websites that deal only with ubuntu:-
http://www.ginad.org.uk/Frameset.html
http://www.ubuntunews.info/
http://help.ubuntu.com
help.ubuntu.com/community
answers.launchpad.net/ubuntu
lists.ubuntu.com
help.ubuntu.com/community/InternetRelayChat
http://www.ubuntux.org/
http://www.ubuntu.com
http://www.markshuttleworth.com
http://ubuntulinuxtipstricks.blogspot.com/
http://www.ubuntuessentials.net/
http://ubuntu-tutorials.com
http://www.debuntu.org/
http://www.ubuntutips.org/
http://www.ubuntutips.net/
http://www.ubuntutips.com/
http://vntutor.blogspot.com
http://www.ubuntugeek.com
http://debuntu.blogspot.com/
http://ubuntu.wordpress.com/
http://ubuntudaily.blogspot.com/
http://ubuntuclips.org/ (videohowto's)
http://www.fullcirclemagazine.org/
(The FREE Independent Magazine for the Ubuntu Linux Community)
http://ubuntudemon.wordpress.com/
http://ubuntuheaven.blogspot.com/
Free Linux C.d's
Free ubuntu stickers
here is the info for getting free linux stickers:-
http://system76.com/article_info.php?articles_id=9
linux counter
Hi all,
please visit the site:http://counter.li.org/organization/
Purpose of the Linux Counter
The Linux Counter is started as a "for fun" project to find out how many Linux
users there are worldwide. The basic idea is for people to register themselves
as being a Linux user. Of course, this way you won't get all Linux users counted
as not every Linux user will register himself at the Linux Counter site.
Thus, the only way to "know" the number of Linux users worldwide, is to make a
guess, preferably a not-too-wild guess of the number of Linux users. Not making
wild guesses there is only one way to go: statistics.
So, the main purpose of the Linux Counter is to deal with statistics on all
kinds of numbers related to Linux usage. It started with statistics on the
number of Linux users and it extended to statistics on Linux users, the machines
they use, software they use and in what part of the world Linux users are
actually living.
A second purpose of the Linux Counter is to make it possible for Linux users to
find each other. The Linux Counter is reporting Linux users sorted per almost
any place in the world. So, when Linux users want their information to be
public, you can quite simply find those users who live in places near you.
tr command examples
Convert from lower case to upper case
echo 'hello world' | tr '[:lower:]' '[:upper:]'
table of equivalence;Linux vs windows
Speed up open office
these are the tips for speeding up open office
* Tools->Options->Memory->Openoffice.org QuickStarter -> Enable systray quickstarter
Open Writer, or one of the other OO applications, and select Tools, Options. Click on Java, and deselect �Use Java Runtime Environment.� I tried it, and it now opens much faster and only uses about 30 MB of RAM. If you like this excellent office suite, it�s worth your time to make this simple adjustment.
Go to: Tools --> Options --> Memory
Set the "Graphics Cache" to 128 MB
And "Memory Per Object" to 24.0 MB
In the Undo section, set "Number of steps" to 20.
In the Cache for inserted objects section, set "Number of objects" to 20.
Ubuntu Linux Vs. Windows Vista: The Battle For Your Desktop
Is Linux finally ready to take on Windows as a desktop OS? We tried
out both Vista and Ubuntu on individual PCs to see which works better. Here's
who won.
By Serdar Yegulalp, InformationWeek
April 27, 2007
URL: http://www.informationweek.com/story
/showArticle.jhtml?articleID=199201179
fine grained difference
I was reading the book Ubuntu Linux Unleashed by paul hudson and andrew hudson.
In this book a paragraph is written as follows.
the command line is also known as the shell,the console,the command prompt,and the CLI. For the purposes of this chapter these are interchangeable,although there are fine-grained differences between them.
Now my question is what is this fine grained difference ???
Roy S. Schestowitz
Just a semantic/conceptual difference. It's essentially (in practice) the same thing unless you are being very pedantic or talk about one particular (fine-grain) aspect, e.g. the prompt.
Peter Kohlmann
"shell" can be quite different. You can have bash, tcsh, csh and others as local shells rsh, ssh (for example) as remote shells They all serve slightly different purposes / have different capabilities, yet they all are "shells"
You can have a command-line (a single one) to start an app if you just press ALT-F2 in KDE. It serves as CLI, yet is different from a console
--
Linux: Because rebooting is for adding new hardware
linonut
shell -- a program that accepts typed commands from stdin, and directs output to stdout and stderr
command prompt -- visual indication that the shell is ready for more commands.
console -- The keyboard/monitor combo; also used for the terminal window (xterm, aterm, rxvt, etc).
CLI -- the interface paradigm used by a shell
Hadron Quark
Not necessarily. The "shell" supports redirection to any stream. It also accepts and channels input from any stream.
From the Wiki
"Bash syntax simplifies I/O redirection in ways which are not possible in the traditional Bourne shell. For example, Bash can redirect standard output and standard error at the same time using the following syntax."
Bourne Again Shell : Bash
Bash has a CLI
Tricky isn't it actually? Command line, shell, prompt etc are used interchangably and incorrectly all over the place.
command prompt -- visual indication that the shell is ready for more commands.
console -- The keyboard/monitor combo; also used for the terminal window(xterm, aterm, rxvt, etc).
CLI -- the interface paradigm used by a shell
The shell runs in a console, using a CLI that produces a command prompt to indicate readiness.
--
ray
Yes, it can be redirected, but it's still reading from stdin and writing to stdout. The fact that those have been redirected to other resources is purely an external artifice.
The Ghost in the machine
Just to be pedantic: in Windows SHELL.EXE was in fact a program, presumably in W95 (it's since been replaced by Explorer but I don't know the details) which allowed for the user to interact with the system at a pointy-clicky level, plus managed such things as file associations (among them, the infamous "open" = "execute" metaphor, which AFAIK is still in Windows today, though at least now it asks).
So again Microsoft has corrupted the original meaning of the term "shell", and that's assuming Unix didn't corrupt it initially; a more logical term would be "skeleton", "starting point", or just "that darned dollar/hash/percent sign" (depending on shell variant and version). Of course you address the last in your next definition... :-)
Also, on a more relevant note, a shell is extensible (presumably, that's the reason the term "shell" is
used), either by using scripts (with built-in commands) or by loading external commands, modules, or what not and running them.
Tcl in particular allows the loading of additional commands using dynamically loadable libraries. I believe Python can also but do not know the details. Bash fires off subprocesses, as do many other command shells. Perl can be pressed into service as a shell but isn't quite designed for such use.
command prompt -- visual indication that the shell is ready for more commands.
console -- The keyboard/monitor combo; also used for the terminal window (xterm, aterm, rxvt, etc).
There is also the capability, if one's set it up, to allow stdin and stdout and stderr to be redirected through a COM port (/dev/ttySn); such a setup is occasionally called a "serial console", and is usable even today in Linux (just edit /etc/inittab :-) ) though obviously with no graphics as such.
Regrettably, I've lost my null-modem cable. :-)
CLI -- the interface paradigm used by a shell
The shell runs in a console, using a CLI that produces a command prompt to indicate readiness.
The pedant in me is rebelling :-), but certainly the intent is for a user to type in commands into something, which also tells him when it is ready to accept more commands, and the results of those commands. That is the gist of CLI, and certainly Bash, among other shells, implements that idea pretty darned well, especially since 1980-era Unix shells did not have command history.
But text input into a command line shell no longer an absolute requirement in Linux, though typing helps.
It is possible to enter words without typing, though -- dasher is a package in Linux that allows the user to
navigate using the mouse to spell words. The iPhone has a keyboard on its touch-sensitive screen; no hardware (other than the screen) required. A virtual keyboard made from a laser scanner is running around somewhere; one touches the tabletop to type.
Makes life interesting.
The Ghost in the machine
That they are, which may be why users are afraid to approach the command prompt. Of course, I have always wondered in some cases exactly what certain icons mean, even the traditional "save" icon (a floppy disc).
Presumably, at some point, floppies will be passe (they're nearly gone, and that's assuming we're talking about the plastic clamshell 3 1/2" variety, which aren't all that floppy compared to, say, 8" Shugarts -- they "flopped" rather nicely, in the physical sense -- or the more common 5 1/4" variant, which was passed by some time ago, along with 1/4" cartridge tapes, Syquest rigid media, and so-called "Superdrives"), and then that metaphor will have to be replaced. Flyovers help, though one has to still move the mouse around.
But anybody with a modicum of knowledge of English will recognize the word "save", or at least be able to look it up in a dictionary. Gnome has an option to use text, icons, or both in its applications, which is nice. I'm not sure what QT/KDE has in that area.
Internationalization is probably the next frontier (it really shouldn't be, but computer languages have had
embedded strings since FORTRAN days, if not even earlier, and it's a hard habit to give up). Not sure exactly where Linux/Gnome/KDE is here, though Glade in particular clearly has the tools to create text files containing messages. Windows has its registry.
Mentor Graphics used to have a suite of tools that allowed for a user to type in part of a command and then
hit control-question mark, "expanding" the command and showing its options. Such sophistication was possible because MG had more control over its commands than current Unix/Linux shells do, and it was a nice way of showing what options were available in a single command of a complex CAD/CAM/CAE system. However, in 8.0, they went for a form-based system, which IMO wasn't quite implemented
right, though it was also fairly popular.
Squeak isn't exactly a command shell (it's a sandbox environment for a Smalltalk implementation and has a lot of capability, though is not widely used) but presumably a message (Smalltalk's rough equivalent of a command -- and the concept does make sense, as the user is trying to send messages to the system in order to get responses back and change state) can have defaults and could do just about anything, including prompt for more input by sending other messages.
I'll admit to wondering what Powershell will do. With my luck Microsoft will patent it and the USPTO not even look at Mentor Graphics or other CAD/CAM/CAE vendors for prior art.
command prompt -- visual indication that the shell is ready for more commands.
console -- The keyboard/monitor combo; also used for the terminal window (xterm, aterm, rxvt, etc).
CLI -- the interface paradigm used by a shell
Gelco caveman
Spinning down hard disk
I was reading the book "Beginning Ubuntu Linux" by thomas keir. In this book there is a tip given to spin down the hard disk. the author says that it will help a lot in power savings.
he gives the tip as follows
all modern hard disks come with the ability to spin down their motors to save energy.Then,when data is requested,the motors spin up again. There may be a slight delay while this happens, and some people
dislike using disk spin-down because of this. However on a notebook, it can lead to a substantial increase in battery life.On a desktop system ,it's worth considering.because over the lifetime of a computer, it can save a lot of electricity.
on terminal type: gksu gedit /etc/hdparm.conf
spindown_time=24
you can alter the value to anything you want.each time unit is 5 seconds,so 24 equates to 120 seconds or 2 minutes.when u are finished,save the file.Reboot for the settings to take effect
will it lead to substantial power savings?????
dcstar
The extra power to restart a drive (as well as the "wear and tear" of the process) may well outweigh the power savings during the off time. If someone could work out a way of "quietening" Linux to minimise system/application background disk writes then this could well be worth trying (even setting up a USB stick drive for these writes would help).
Knowledge is a measure of how many answers you have, intelligence is a measure of how many questions you have.
MS3FGX
It depends if you are on a laptop or a desktop, really.A spinning HDD uses about 10 watts if I recall correctly, which is almost nothing on a desktop machine, but can make a big impact on a laptop.
J.O Aho
A hard drive consumes somewhere around 2.5-18 WATT depending on the size and age of the hard drive, compare this to a CPU which draws 80+ WATT. You will still have some energy consumption while spin down, maybe 1 WATT, so do the maths how long you have your computer on per day and how much you use the computer while it's on... while you use the computer, you won't make much of saving, while the computer is idle you may save a little bit (depends on how often your cron jobs runs).
The spin down will shorten the lifespan of the hard drive and a 24second delay for spin down after usage is a short time and the delay for spinning up is noticeable. I don't recommend any spin down times less to 5 minutes.
[H]omer
Why reboot? ~]# hdparm -S 24 /dev/
"[Microsoft] are willing to lose money for years and years just to | make sure that you don't make any money, either." - Bob Cringely.
Handover Phist
Yep. From the man page:
-S
Set the standby (spindown) timeout for the drive. This value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though
most drives are much quicker. The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode.Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from
241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor- defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15
seconds. Note that some older drives may have very different interpretations of these values.
so the command:
# hdparm -S 24 /dev/[hs]d[abcd]
will set the spindown for those drives to two minutes or whatever. Ubuntu probably has the file /etc/hdparm.conf for reference by startup scripts. Slackware doesn't use that so I can't confim that it'll work
for you.
> Reboot for the settings to take effect
> Now question is how effective is this tip ???
> will it lead to substantial power savings?????
--
You LIVE in that head?
Rodney
It *could* extend battery life and or save electricity, a lot would depend on how you use the system. Keep in mind the bit about the drive needing to spin up when you need to access it for something, and that includes if the system needs to access swap or deal with a journal on a journaled file system or write any log, etc. Spining down and back up frequently has the potential to use more power than constantly spining because it takes more power to spin it up than to keep it spining (due to momentum I think). So, there is no definitive answer to the general question as you asked it, it depends. I have seen people write that they extended their battery life by an hour or more, I have no way to determine if what they write is accurate. Some systems are setup to run from a ramdisk and don't need a drive spining all the time (fast and less power). On this desktop, I spin down my data drives but the drive with my OS is usually being used, I do
note a slight lag (and hear it spin up) when I access one of the data drives. If you don't need to access a drive for long periods, I imagine you would save some electricity by spining it down until you needed it.







