Mona Hammoud wrote:
> okay so here are some problems:
>> problem 1:
> i have 2 operating systems on my computer : Windows
> Me and Red Hat Linux.
> I faced some problems with Windows so i deleted all
> the partitions on my computer to reinstall both
> operating systems again. I deleted the Linumx and the
> Windows partitions.
> The problem is: When I boot the computer LILO is still
> there but can't load Linumx or Windows.
> When I boot the computer with a startupl disk and
> after creating a primary partition FAT 32 to install
> windows, I run setup from the windows cd rom when it
> tests the system for setup (100%) it reaches 100% and
> then freezes. so i have to reboot (I can't install
> windows because everytime i run setup it freezes)
Quick overview : You need to repartition your hard disk (linux fdisk
is probably the best tool), and create :
1. First partition for windows (C: Drive)
2. Partition for Linux
3. Swap partition for Linux (100-200MB only)
4. Second windows or Linux partition
Depending on the size of the hard disk, you can set these to different
sizes, but you should ensure that the first Linux partition lies
completely below the 1024 cyclinder mark on the hard disk, to enable
it to boot correctly.
Next, install Windows as normal, in the first partition (i.e. no Linux
on the hard disk at this point). Then, install Linux in the second
partition. At this point you will be asked whether you want to put LILO,
which is the Linux boot loader that loads the OS from disk, in the MBR
of the disk or in the Linux partition itself (probably /dev/hda2, if
you're using an IDE drive, or /dev/sda2 if you're using SCSI).
You should install LILO in /dev/hda2, NOT the MBR. Then, you should use
fdisk again to ensure that the second partition, Linux, is the active
The Linux install will autodetect the Windows install, and offer you the
option of dual booting. When you restart the machine, you should see the
LILO prompt come up. Press tab, and you'll be offered the choice between
linux and dos : pick whatever you want to boot into.
The reason that you need to put LILO into the second partition is
because Windows installs into the root of the disk, and if you overwrite
it with LILO you will be unable to boot Windows at all.
> problem 2:
> when i use the command gcc to compile a c program the
> following message appears:
> bash: gcc command not found
You must choose gcc (which is the Gnu C Compiler)from the list of
packages made available during the install process. Once you have
selected this, it will be installed and available to you from the
command line as above.
> problem 3: (same user switch between terminals)
> i'm a beginner for linux os. i know that we have
> something called tty1, tty2, tty3, tty4 can i know
> what are these? and how to switch between them?
These are 'virtual terminals', which are not linked directly to a piece
of hardware such as your keyboard/monitor. You can summon whichever one
you want by pressing ALT-F1 (or possibly CTRL-ALT-F1)for terminal 1, and
ALT-F2, F3, F4 for the others. This allows you to have multiple programs
running with output to the screen.
This assumes that you're not running X-Windows, in which case the tty's
are not really used much.
> problem 4:
> how to run a C program after compiling it?
Depending on how the compiler was called, it will produce either a named
binary file or a default file such as 'a.out'. Linux does not rely on
extensions such as '.exe' to distinguish an executable file : it uses
file permissions and internal checks to decide how to run it.
If you're compiling software provided by someone else, then it will
almost certainly compile a file with the name of the project. The Apache
webserver, for example, produces a number of executables, such as httpd.
If you can tell me more about your hardware, OS versions, and the code
you're trying to get working, I can help more.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!