VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Direct Linux Host  (Read 2940 times)

Gagle

  • Member
  • *
  • Posts: 11
Direct Linux Host
« on: May 16, 2007, 04:55:48 pm »

Hi, ;D
I've been trying to install VL on my old laptop.  The Floppy install failed for the usb cd-rom wasn't detected (even using the smartbootmanager....). 
I'm now trying to use the install script to start the installation from my Edgy partition. 

The problem is that every time I execute the script, it tells me "ERROR : must run as root"

This is how I proceeded:

1. Activate a root account. (Debian distros don't always have an activated root account)
2.logout from my graphical X session.
3.[Ctrl-Alt-F1] my way to a command line session.
4. login as root.
5.go to the directory where is stored the .iso and the install script.
6. typed <init 2>
7. execute the script this way :  ./vinstall-iso VL-5.8-std-Gold.iso

and then I get the error mentioned before.

Now, I know maybe the script permission is causing problems.. i really don't know for I am quite a n00b with Linux.
If I execute this command; < ls -l > ; I get this result :

-rwxrwxr-x 1 gagle gagle   [.......]  vinstall-iso
-rwxrwxr-x 1 gagle gagle   [.......]  VL-5.8-std-Gold.iso

where [......] are irrelevant infos(date and size) and gagle is my user name, that hasn't anything to do with my root acount.
That's why I am led to think there is a permission problem and I don't know how to use chmod intelligently.

Thx

« Last Edit: May 16, 2007, 04:59:45 pm by Gagle »
Logged

saulgoode

  • Vectorite
  • ***
  • Posts: 340
Re: Direct Linux Host
« Reply #1 on: May 16, 2007, 06:50:30 pm »

Can you provide the number output if you execute the following command after Step 5?

echo $UID

If it is not "0" then you have not really created a true 'root' account, you have just created an account named "root" that has SUDOERS privileges.
« Last Edit: May 16, 2007, 06:52:50 pm by saulgoode »
Logged
A complex system that works is invariably found to have evolved from a simple system that works.

Gagle

  • Member
  • *
  • Posts: 11
Re: Direct Linux Host
« Reply #2 on: May 17, 2007, 09:58:55 am »

I know what you mean.  I am root.  It outputs '0'  and even specifies root account if I do another similar command.
That is what freaks me out. 
I must've done something dumb regarding the script. 
Is there a way to save and execute a script, or give it executable properties using chmod ?   

Any ideas why it doesn't work ?
Logged

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: Direct Linux Host
« Reply #3 on: May 17, 2007, 10:03:09 am »

its not the permissions they are set to executable.
try commenting out the section of the script that checks for root user
Logged

saulgoode

  • Vectorite
  • ***
  • Posts: 340
Re: Direct Linux Host
« Reply #4 on: May 17, 2007, 12:27:06 pm »

Here is what I did to install the latest SOHO ISO. I started with four partitions: HDA1 was my Slackware partition which I was running as I performed all of this; HDA2 was the partition to which I was installing Vector; HDA3 was a data partition which was completely ignored; and HDA4 was my swap partition.

First we need to extract the 'initrd' from the ISO.
Code: [Select]
mkdir VL-MOUNT
mount VL5.8-SOHO-final.iso VL-MOUNT/ -o loop -v
cp -v VL-MOUNT/isolinux/initrd.img initrd.img.gz
gunzip initrd.img.gz
umount VL-MOUNT

The above code will mount the ISO as a "loop" device. This means that, once mounted, you can access the contents of the ISO just as though it were a disk drive. "VL-MOUNT" is just an arbitrary name for the mount point. The file, "initrd.img" on the ISO is actually a GZIPped file, so we unzip it after we have extracted it from the ISO. After the file is extracted, I unmounted the VL-MOUNT directory so that I could re-use it (alternately, I could have used a different mount point for the following commands).

Now we are going to mount the extracted 'initrd' filesystem (again, as a loop device) and mirror some of the current system directories so they will be available to the "setup" program later on.
Code: [Select]
mount initrd.img VL-MOUNT/ -o loop -v
mount /proc VL-MOUNT/proc/ -o bind -v
mount /dev VL-MOUNT/dev/ -o bind -v
mount /sys VL-MOUNT/sys/ -o bind -v

We are now going to mount the original ISO onto the initrd filesystem so that the setup program will be able to access the files on it.
Code: [Select]
mount VL5.8-SOHO-final.iso VL-MOUNT/mnt/source/ -o loop -v
Next, we must prepare a mount table for the initrd so that it knows where the active root system is (if you wished, you could use a text editor to create the file). The "/dev/hda1" is the system root partition at the time you perform these commands.
Code: [Select]
echo "/dev/hda1 / auto defaults 0 1" >VL-MOUNT/etc/mtab
echo "none /proc proc defaults 0 0" >>VL-MOUNT/etc/mtab

Everything is ready to 'chroot' to the initrd directory and perform the setup. HDA1 and HDA3 are excluded from the setup so that they are not accidentally destroyed.

Code: [Select]
EXCLUDE_PARTITIONS="/dev/hda1 /dev/hda3" chroot VL-MOUNT/ /usr/sbin/setup --hosted

« Last Edit: May 17, 2007, 01:03:29 pm by saulgoode »
Logged
A complex system that works is invariably found to have evolved from a simple system that works.