Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-04-2011, 07:50 AM
|
#31
|
Member
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269
Rep:
|
Yes, if the live CD didn't mount the old partitions for you you will need to do so manually using the mount command. So if you determine that /dev/cciss/c0d0p1 is supposed to be /boot on the server when running properly you would do something like this:
sudo mkdir /mnt/oldboot
sudo mount /dev/cciss/c0d0p1 /mnt/oldboot
sudo cd /mnt/oldboot
ls -l
That will give you an idea of what data is on the partition, permissions, file sizes, etc.
|
|
|
01-04-2011, 02:27 PM
|
#32
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Ok, thanks.......now that being said, what if any harm can I do to current system?
It "seems" with all the reading I've been doing that Linux is pretty forgiving, yes?
Also, in using the Ubuntu cd and command line I'm not too sure whether I'm looking at ubunutu or the actual server. What should my prompt look like......ubunutu/ubuntu? root/????.......
|
|
|
01-04-2011, 06:10 PM
|
#33
|
Member
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269
Rep:
|
Yes Linux is fairly forgiving, but you can still do permanent damage such as deleting files, formatting drives, etc. Be especially careful when running as root or using the sudo command as these have the potential do allow you to do even more damage. As a normal user though there is very little you can do that will really mess up an entire system.
As far as knowing where you are, well that is up to you. The OS is Ubuntu, and when you open a terminal it will be Ubuntu, but you could easily mount the server hard drives and delete all data on them and not really realize it if not careful. This is why I recommended you mount the old server partitions using something like /mnt/oldboot, this will make it obvious which drive you are working with. When working in a terminal in Ubuntu you will likely be using bash as your default shell, and this will show your working directory as a part of the prompt. So if you mounted the old partitions as /mnt/oldxxx and you see anything like that at your prompt you are modifying the old server.
|
|
|
01-05-2011, 09:49 AM
|
#34
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Eirk, I performed the above commands. What information am I looking for......there are about 20 or so similar lines of info.
None of the columns are labeled, but I do see GRUB and kernel listed far right hand column.
Can I access or test this info these individual lines?
|
|
|
01-05-2011, 09:50 AM
|
#35
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Also, if I did the same to the other 2 partitions.....would I get similar info? Is there a GRUB file in every partition?
|
|
|
01-08-2011, 03:11 PM
|
#36
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Ok, I've mounted the other two and not nearly as much info as /dev/cciss/c0d0p1.
In attempting to sudo grub, I get command not found. I get instructed to use apt-get install grub and I did that but aborted at the y/n prompt....wasn't sure I wanted to procede here.
The fact that I find the "path" to /boot/grub/grub environment tell me anything?
Also see /vmlinuz and /initrd.img......
|
|
|
01-11-2011, 10:43 AM
|
#37
|
Member
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269
Rep:
|
Grub would only be on one partition, /boot, the other partitions which would be required are / and possibly a swap partition.
Using the Ubuntu live CD to install grub will not help, you want to repair the installed version. My /boot partition on a RHEL server looks like this:
[erik@serv ~]$ ls /boot
config-2.6.18-194.17.1.el5 initrd-2.6.18-194.17.1.el5.img symvers-2.6.18-194.17.1.el5.gz System.map-2.6.18-194.17.4.el5 vmlinuz-2.6.18-194.el5
config-2.6.18-194.17.4.el5 initrd-2.6.18-194.17.4.el5.img symvers-2.6.18-194.17.4.el5.gz System.map-2.6.18-194.el5
config-2.6.18-194.el5 initrd-2.6.18-194.el5.img symvers-2.6.18-194.el5.gz vmlinuz-2.6.18-194.17.1.el5
grub lost+found System.map-2.6.18-194.17.1.el5 vmlinuz-2.6.18-194.17.4.el5
All of the 2.6.18 type files are related to different kernel versions I can boot to, so you will need at least one set of these (config, initrd, vmlinuz, etc.).
The /boot/grub directory on the same server looks like this:
[erik@serv ~]$ ls /boot/grub/
device.map fat_stage1_5 grub.conf jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
What does your /boot/grub/grub.conf and /boot/grub/menu.lst contain?
|
|
|
01-11-2011, 02:32 PM
|
#38
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Yes, I have to remind myself that I'm only using the live cd to be able to "view" this system, not necessarily copy any files from the cd to system.
I'm still a little unsure if I'm looking at the cd or my server. The commands you gave previously, sudo fdisk -l and then df......do I need to be at a certain prompt/directory when I perform these commands? When I open terminal, I start at ubuntu@ubuntu:~$
I'm not onsite today to try, but can I type the above ls /boot and ls /boot/grub/ commands from any prompt?
When I tried to view the the grub.conf or menu.lst using cat?/file?, I get ASCII text response if I recall correctly.
For what its worth, I just looked at some old terminal sessions and I saw at one point I had typed:
root@ubuntu:/boot/grub# ls -l
permissions root root size date grubenv
Thanks again!
|
|
|
01-12-2011, 05:44 PM
|
#39
|
LQ Newbie
Registered: Dec 2010
Posts: 25
Original Poster
Rep:
|
Erik, it seems all I get with those commands in GRUBENV.
|
|
|
All times are GMT -5. The time now is 05:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|