LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changed fstab, won't boot from HD, won't boot from USB (https://www.linuxquestions.org/questions/linux-newbie-8/changed-fstab-wont-boot-from-hd-wont-boot-from-usb-4175439008/)

swilsy 11-27-2012 07:38 PM

Changed fstab, won't boot from HD, won't boot from USB
 
I am running Ubuntu Server 12.04 64-Bit. I originally installed using LVM with a logical volume mounted at / and a swap partition. I started setting up Samba and created two more logical volumes with ext3 file systems and mounted them to two new directories. Later I decided I wanted /var to have its own lv partition, so I got some help with a post here on LQ, and managed to create a new logical volume (ext4 to match the root volume),mount the new volume to a newly created /tmp directory,get the files from /var copied over to /tmp,unmount the new volume, remove the existing /var directory, create a new /var directory, and mount the new volume there with all the original /var files.

Everything seemed to be fine to this point.

I then discovered that fstab needed to be edited so that the new lv would mount at /var on boot. While I was in there I added lines for the two logical volumes tied to the Samba share directories (up till that point, I had just been manually mounting the volumes after booting up). I thought I understood everything pretty well as far as what needed to go into fstab. I did not read very closely regarding the <pass>. I still don't really know what fsck does to be honest. I left root as 1, another file system had a <pass> value of 2,then I continued to sequence up for the remaining 3 file systems I added to fstab. below are the three lines I added:


<file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/VG-LV1 /Share1 ext3 defaults 0 3
/dev/mapper/VG-LV2 /Share2 ext3 defaults 0 4
/dev/mapper/VG-var_1 /var ext4 defaults 0 5


I know now that <pass> can only be one of three choices, 0,1,2. I saved the changes, exited nano, then reboot my machine, but it didn't reboot. It never came all the way online. I could hear the cpu fan, and the LEDs are lit up, but nothing on my monitor. Next I tried to boot from the USB I had originally used to install Ubuntu. I changed the bios settings to boot from USB FDD (usb was formatted to FAT32), but it won't boot from thew USB. I happened to have a live DVD of Ubuntu Desktop 11.10, and was able to boot from that without installing. From the live DVD, I tried mounting the logical volume needed to access /etc/fstab, but I received and error regarding LVM not being present. At that point, I gave up. I figured if I installed this Ubuntu Desktop 11.10, I would then be able to boot from USB, and I could reinstall Ubuntu Server 12.04. WRONG! I installed the desktop version, and my computer will still not boot from USB. I don't understand. I used the USB to install Ubuntu before, and now it doesn't work. I even tried booting another machine from USB with the same flash drive that wasn't working on my machine, and it booted just fine.

Please help.

I clearly don't understand the implication of altering fstab (please help here), and now my machine won't boot from USB.

exvor 11-27-2012 08:55 PM

Hmmm your situation is odd indeed. Altering fstab can cause booting issues but normally you will get some kind of output to explain why the booting process is failing ( inaccessible root device, no root found, etc etc.). Also there is no way that altering a setting in fstab can cause your system to no longer boot from usb, unless your using the boot loader from the internal hard disk to chain load onto the usb or some other craziness. You say that you get no output from the screen so the bios is able to load the bootloader at least as bios would report a failure.

I am not familiar with using LVM at all so I cannot give any useful info on why your LV is not showing up after booting a live disk. Maybe someone more familiar with LVM and booting can have some useful information on that. I suspect a hardware problem but then again it could be something else....

swilsy 11-27-2012 09:21 PM

The monitor I use is a little strange and old. On a usual boot the monitor will display the usual black screen with boot options F12 etc. Then the screen will behave as if there is no signal before showing the usual Ubuntu server login prompt. After editing fstab, and rebooting, the monitor would her stuck in the no signal mode. The machine may have been displaying something, but I just couldn't see it.

I'm rememring now that when I booted from the live disk to try and edit fstab, I could see my physical volumes sda and sdb (I think) sdb was used to house the logical volumes including the one containing /etc/fstab. When I tried to mount sdb, i received the LVM error.

swilsy 11-30-2012 02:35 PM

Ok so I figured out what the problem was. There are two places in the BIOS to change the boot priority. The I finally found it (I must have forgotten about it from when I originally set up the server), and was able to boot from the USB and get Ubuntu Server 12.04 back on the computer. I think that the monitor I was using prevented me from seeing an error after I messed around with fstab the first time. It would show a blue screen with "unsupported mode" listed on the screen when it should have been telling me that there was a problem mounting my disks.

In conclusion, I am back up and running, I do get the pleasure of reinstalling and configuring everything (good practice), and I was able to create a new logical volume, mount it at /var and add it to fstab with default <options> and 0's for <dump> and <pass>.

thank you for trying to help exvor, but this appears to be a case of the stupid on my part.


All times are GMT -5. The time now is 08:20 PM.