Ubuntu :: Different Ways To Use The "chroot" Command?
Jul 23, 2010what are the different ways to use the "chroot" command?
View 3 Replieswhat are the different ways to use the "chroot" command?
View 3 RepliesIn a script that I'm still writing, I'm trying to build a package from source within a chroot'ed environment. 1) I could chroot and then cd to /usr/src and then manually install the package. 2) I could chroot and then run the installation script from the proper directory. 3) What I want to do and what's giving me issues, is to issue a command similar to this:
Code:
chroot /root/me/here cd /usr/src
...and have it do the installation after changing to /usr/src.
[code]....
Recently did a clean install (instead of upgrade) of 11.04 from 10.10 and this error bugged me for the first time.
ubuntu@ubuntu:~$ sudo apt-get install grub-pc
Reading package lists... Done
Building dependency tree
[code]....
followed this one too to the letter: ubuntu@ubuntu:~$ sudo chroot /mnt/clean/sda1 apt-get install -y grub-pc chroot: failed to run command `apt-get': No such file or directory tried this one too:
ubuntu@ubuntu:~$ sudo grub-install /dev/sda1/usr/sbin/grub-probe: error: cannot stat `aufs'.and this too which got me a bash something:
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
[code]...
I have booted up into Ubuntu 10.04 LTS disc live.
When I type 'chroot /media/(UUID)', I get:
chroot: cannot run command '/bin/bash': no such file or directory.
'/bin/bash' does exist.
Why is this error occurring?
recently we decided to make our own panel (like Plesk or cPanel) but for Ubuntu and it will be licenced under GPL (like any other professional sofware).want to make a panel not only that fits our needs but also the needs of other system administrators and domain owners. We researched other panels and found out that non of them has security/look/ease of use in one package. Bad codig is another problem found in other panels.I made a short overwiev of what I think we have to have in the beginning.I Security :1. Completely chroot enviornoment where every single service is in chroot mode (bind,mysql, postfix, .... )2. Easily managed IPtables trough web-based interface. 3. Coding rules has to be strict.
II Software selection :
1. MTA - Postfix
2. POP - dovecot
[code]....
I'm trying to change the root directory to /tmp/somedir using chroot, but even using sudo or su-ing to root I get the message:
Code:
cannot run command `/bin/bash': No such file or directory
I tried copying /bin/bash to /tmp/somedir/, but the same error occurs. What's wrong with my chroot?
I installed Ubuntu Netbook Edition 10.10 on my Eee PC 901 (the one that has 2 SSD's). It all went fine, and I ran the update manager straight after install and config. It installed the updates (all 198 of them!) without error. I was prompted to restart, so I did. I got the error "udevadm trigger is not permitted while udev is unconfigured". I found out that this error is well documented, and I followed the guide at [url](apparently it affects all variants, not just UNE).
It went O.K., until I tried the command "sudo chroot /media/newroot". I got the error that "cannot run command '/bind/bash': no such file or directory". What should I do?
I cannot boot into and earlier kernel (problem/current one is 2.6.35-23-generic) I can only fix it via live USB stick.
I've been searching the web, without finding any sollution to my problem.vsFTPd is acting really weird. I've never seen this problem before, and I've been using vsftpd for some years nowWell.. The thing is, I've made a user that chroots to the folder /var/www on my server. And when I then try to chmod the file /var/www/htdocs/testsite/index.html through my ftp-client, I only get the error "550 SITE CHMOD command failed.", and when I then check in my /var/log/vsftpd.log it says
Code:
FAIL CHMOD: Client "192.168.50.58", "/htdocs/testsite/index.html 777"
Which I think would mean that it tries to chmod the file "/htdocs/testsite/index.html" instead of chmod the
[code]....
This is a clean install of Lucid sometimes I get the Ubuntu loading screen and sometimes just black screen followed by a flash of green across the top and some text. Sometimes its loads with a high resolution and that's when there are other problems no authorisation to mount other file systems and no shutdown or restart just takes me back to login. When it loads at the lower resolution it seems to work fine.
View 8 Replies View RelatedI just want to know weather it is possible by some means to set different preferences for the two desktops that are available in ubuntu?? E.g.: different backgrounds, shortcuts etc...
View 2 Replies View RelatedI have been using another Linux distro(Xandros) for 3 years on one computer and have just installed Ubuntu 10.04 on a different computer. I am trying to network the 2 computers via simple ethernet cards and a crossover cable so that I can gradually migrate applications, data and peripherals from Xandros to Ubuntu. I am completely new to Ubuntu and I am really struggling to get NFS to work. Each computer
can ping the other, so the hardware connectivity seems OK. I have shared the relevant directories from each computer. I have followed malco2001's ellent HowTo guide and have now reached the stage where Xandros, as client, can mount directories on Ubuntu, as server, and see the files but I cannot get Ubuntu, as client, to mount directories on Xandros. When I attempt this from Ubuntu, using the command
# mount -t nfs 192.168.1.2:/home/richard /mnt/PC2_richard
(I have already issued from Ubuntu: # mkdir /mnt/PC2_richard)
I get the message:
mount.nfs: mount to NFS server '192.168.1.2:/home/richard' failed: RPC Error: Success
The configuration of various files etc. is as follows:
Ubuntu
IP address: 192.168.1.1
[Code]...
I should mention that Xandros does not have nfs-kernel-server installed; instead it has nfs-user-server.I am sorry if I have omitted or done something really stupid but I have spent best part of a week on this with only partial success.
I have an old desktop computer at home in which the CD drive is not functional. Also my BIOS does not allow me to boot from USB. Is there anyway in which I can run Ubuntu 11.04? Installing inside windows is not an option too because the partition containing windows is not not working.
View 2 Replies View Relatedcan anyone please provide useful command for :
1)ways to enable/disable OS service(FTP/Email/Web server/Firewall/telnet/Lan file sharing)
2) basic interaction with the OS ( checking information/Open Files/Running Program)
3)Boot-loading configuration and customization
4)installation/uninstallation of programs/system patches
5)System configuration(Time setting/Date setting/User login detail change/Access right control)
My desktop machine has U 10.10, Gnome, Compiz, Cairo dock. After a lengthy session with lots of programs and windows open, hitting the shutdown or restart or logout buttons don't produce anything at all. Suspend works. Sudo shutdown -h now in a terminal window works. Why the graphical ways of shutting down don't work?
View 1 Replies View RelatedI found myself in troubles. I was trying to get dts passthrough works in many many ways with no success. Finally I (desperately) decided to try OSS rather than ALSA following this guide: [URL].. And there the things went wrong. I ended up with no sound at all so I tried to reinstall alsa again but with no luck.
basicaly what I did after following the guide was: sudo apt-get install alsa-base alsa-utils. sudo dpkg-reconfigure linux-sound-base //and choose alsa
but still, for example:
$ alsamixer
puts:
alsamixer: function snd_ctl_open failed for default: No such file or directory
$ /etc/init.d/alsa-utils start
* Setting up ALSA... [ OK ]
but no alsa process at all. $ aplay -l aplay: device_list:223: no soundcards found. It seems to me like sound card drivers are gone..
I find out there are two ways to do that:
sudo passwd -l root
sudo usermod -p root
What are the different? I saw a kubuntu post said:
-l, --lock
Lock the named account. This option disables an account by changing the password to a value which matches no possible encrypted value. I enable and set a root password, I want to return to a "no possible encrypted value" just like the way it was.
am running 10.10 64bit and I am wanting to change a few wayssome programs start up on boot, they are as follows:1. make NetworkManager not load onboot and require me to manually start it in the command line2. make bluetooth not start on boot and allow to manually start it from the command line3. make networking not boot on startand start manually from command line I have been trying to search on google but most of thereads I find are about removing things completely and the few that werent did not work for what I want to do.
View 8 Replies View RelatedI'm looking to run a dual boot on this laptop. I have Win7 currently installed, and I have my hard drive partitioned and ready to go for an Ubuntu install. I've downloaded the i386 CD from the website, burned it successfully. I rebooted with the disc in, and when I select install to hard drive, it shows a blinking cursor below the install screen and hangs there. I installed the ISO to a bootable USB drive and tried to install it that way, same thing. I even tried downloaded one of the alternative CDs and installing it both ways. Same problem. Ive installed Ubuntu on this laptop before and it's ran successfully. I believe it was 9.04.
Gateway ML3109
2GB of RAM
75GB HDD (65 for Win7, 10 for Ubuntu)
798MBs of Video RAM
I am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables.Are there any other ways to set environment variables and what are the advantages/disadvantages of them?
View 4 Replies View Relatedwould be the best and easiest way to control my remote server(preferably using desktop GUI of course) from a Windows PC ?
View 4 Replies View RelatedI'm currently trying to find ways to get in-depth knowledge of the Linux OS. To give a brief overview of where I am at right now, I am a computational science graduate student who does all of his work on *nix scientific clusters.I also took a lot of computer engineering and computer science courses in college, as well as being the stereotypical standard computer nerd growing up, so I'm somewhat familiar with computer architecture, though more from the hardware side.So I'm familiar (though I wouldn't claim to be an expert quite yet, by any means) with using Linux and C programming, and I have a basic grasp of generic computer architecture, but what I feel I really lack knowledge in is the specific details of the Linux. All the details of the boot process, exactly what the kernel does, how Linux handles memory management, etc. I'm having difficulty finding any information on this;all I can find is generic information targeted towards people who are just starting out, and the stuff I've found that talks about the kernel seems more oriented towards "you change setting X and Y happens" rather than what the kernel is doing.
View 7 Replies View RelatedI've found various programs and methods to measure FLOPS, but I don't seem to understand them. What is wrong with the following?
test-flops.py
Code:
#! /usr/bin/env python
float_increment = 1.03 # random
start = 57.24 # random
floating_point = start
for i in xrange(10 ** 6):floating_point += float_increment
Code:
PROMPT$ time ./test-flops.py
As far as I can see, this times a program that performs 1 million FLOPs (namely incrementation).
This outputs about 1.2 seconds on my (reasonably fast) machine, giving 840kFLOPS, which is much too low.This post may be in the wrong section; a C translation increments the result by three orders of magnitude (ie, py sucks), but this is still considerably less (~ 7-fold) than published values.
I just recently installed Fedora Server on my computer and I am planning on hosting my website on this server instead of paying for hosting.All of my files for my website are currently using php but for some reason when I moved them here to "test" them before launching the final switch, the PHP does not work.I have further investigated this issue to learn that my php files were written using:<? and ?> to start the scripts
Apparently I have to write <?php and php?> to make these scripts work now.Is there a way I can edit a system file to allow me to use both instead of having to change all my files?
During my read, "Code Complete",the author described the different ways of handling the ADT interface.He has wrote this passage:
Quote:
Option 2: Explicitly provide the data used by the ADT services. In this approach, you declare the data that the ADT uses within each routine that uses an ADT service. In other words, you create a Font data type that you pass to each of the ADT service routines. You must design the ADT service routines so that they use the Font data that's passed to them each time they're called. The client code doesn't need a font ID if you use this approach because it keeps track of the font data itself. (Even though the data is available directly from the Font data type, you should access it only with the ADT service routines.This is called keeping the structure "closed.") The advantage of this approach is that the ADT service routines don't have to look up font information based on a font ID. The disadvantage is that it exposes font data to the rest of the program, which increases the likelihood that client code will make use of the
ADT's implementation details that should have remained hidden within the ADT.
The problem is that it is a bit subtle in terms of coding for me. Can anybody give more concrete example, in working codes, especially in Java?
I have 3 servers with Oracle 10g installed. In order for rsync to work for log shipping I need to have passwordless SSH configured.*Note: I did not configure these servers, 2 DBA's got canned and I'm left to fix this and I am not a DBA.I have done passwordless SSH in the past and it is easy.Here is my problem: (-> = passwordless ssh works)ServerA -> ServerCServerB -> ServerCBut I need all 3 to be able to do passwordless SSH to each other.I deleted all the files in /home/oracle/.ssh on all 3 servers and this is what I did for all 3 servers:
ssh-keygen -t rsa
ssh-keygen -t dsa
cat id_rsa.pub >> authorized_keys
[code]....
I've set up a server for the first time today and I'm reading up on how to secure it. But I was wondering if anyone here would give me some tips from personal experience on what to do before going online with my website for the whole world to see. I'm running Ubuntu Server edition and Apache. Am I good to go with default settings or is there anything recommended that I should first do?
View 9 Replies View RelatedI have an Alienware M11x r2 laptop running Windows 7-63 and Ubuntu 10.10 Unity installed.It was all fine and dandy until I changed my grub timeout to 1 sec (or perhaps 0, its been so long i can't remember!) to reduce the waiting time until an OS boots.My grub was set to boot to Windows 7 as default.Now when I boot up I cannot halt the boot process not matter what key I press (e.g SHIFT).I am doomed to forever boot into Windows. Its been months and I had written off my Ubuntu OS but I am tempted to try and fix this one more time.Since I cannot access the Ubuntu installation AT ALL I cant use the usual ways to increase the timeout on the grub menu (yes I have searched the forums far and wide).
Is there ANY way of changing the grub menu parameters without actually booting into Ubuntu Unity? Can I modify the timeout settings using a live cd or usb boot?
i am running lubuntu and i have google chromium. i went to videos today, and i add to install adobe flash player, i tried downloading all type of ways (from the options list) but nothing work, how do i install adobe flash player on lubuntu?
View 2 Replies View RelatedI have created a /tftpboot directory and chmod it to 777 I have put an image 'uImage' on my Debian box under /tftpboot In directory /etc/xinetd.d/ I have created file tftp:
Service tftp
{
disable = no
socket_type= dgram
protocol= udp
wait= yes
user= root
[Code]...
I keep geting timeouts although uImage is on the debian box and it appears the tftp server is running.
What is one of the best ways to partition my hard drive? It's 110GB. I will be installing Fedora with XFCE but I want to also install other linux distro on the same laptop to experiment and I want to have the iso on the hard disk and install them from the hard disk. I'm not sure how many distro I will try but I could remove the ones I don't like.
View 8 Replies View Related