<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Ok, first of all, I've added
<a class="moz-txt-link-abbreviated" href="mailto:ubuntu-devel-discuss@lists.ubuntu.com">ubuntu-devel-discuss@lists.ubuntu.com</a> to my CC list as I thought
how I responded to the email would have worked (I don't see it in
my local mailing list copy, I tried Ctrl+Shift+L to 'reply to
list' in thunderbird, now I am 'replying to all')<br>
<br>
It looks like you got the phantom bug I got, so this is my best
guess is to resolve archive.ubuntu.com and temporarily add it to
the chroot environments "etc/hosts" file... This is because the
Ubuntu Core doesn't have nslookup and cannot resolve the IP
address. (I guess if you have already resolved it, it somehow uses
your system's cache or something, either way, it is an odd bug)<br>
<br>
host# nslookup archive.ubuntu.com<br>
Copy or write down the IP address you get<br>
host# vim (or other text editor as root) mnt/etc/hosts<br>
Add the line:<br>
ip-address-from-above archive.ubuntu.com<br>
You can alternatively do this:<br>
host# echo ip-address archive.ubuntu.com >> mnt/etc/hosts<br>
host# chroot mnt<br>
host# apt-get update<br>
<br>
I suspect that both the 'sudo' package, 'net-tools' and 'dnsutils'
are meant to be part of Ubuntu Core.<br>
<br>
From,<br>
Kieran Grant<br>
<br>
On 05/12/12 20:51, Saqlain Abbas wrote:<br>
</div>
<blockquote
cite="mid:CAKQ1VnQTzGT0YDTmmBJgNXzNDopmwNkui3OXjQ4Y2-w8gJwXeA@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Well from the instruction of <a moz-do-not-send="true"
href="https://wiki.ubuntu.com/Core" target="_blank">https://wiki.ubuntu.com/Core</a> i
thought sudo packages already installed and i thought i am doing
something wrong, may be instruction on above link should be
updated to mention this for new guys like me, that sudo packages
should be installed explicitly to make it work?</div>
<div><br>
</div>
<div>Secondly now I tried to install pakcages in Ubuntu Core, i
idid something like below</div>
<div><br>
</div>
<div>host# chroot <span
style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-size:13px;line-height:19px">/mnt/root</span><br>
chroot# dpkg -i /tmp/*.deb<br>
chroot# apt-get update<br>
</div>
<div><br>
</div>
<div>sudo apt-get update Command fails with below errors, kindly
suggest how to get rid of them...i was just thinking if to get
rid of below errors i need to modify some file how would i do it
as by default no editor is installed like vi or other?</div>
<div><br>
</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise InRelease</div>
<div><br>
</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise-updates InRelease</div>
<div><br>
</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise-security InRelease</div>
<div><br>
</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise Release.gpg</div>
<div> Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise-updates Release.gpg</div>
<div>
Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div>Err <a moz-do-not-send="true"
href="http://archive.ubuntu.com">http://archive.ubuntu.com</a>
precise Release.gpg</div>
<div> Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div> </div>
<div>Reading package lists... Done</div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise/InRelease">http://archive.ubuntu.com/ubuntu/dists/precise/InRelease</a></div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease">http://archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease</a></div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise-security/InRelease">http://archive.ubuntu.com/ubuntu/dists/precise-security/InRelease</a></div>
<div><br>
</div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise/Release.gpg">http://archive.ubuntu.com/ubuntu/dists/precise/Release.gpg</a>
Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div><br>
</div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg">http://archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg</a>
Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div><br>
</div>
<div>W: Failed to fetch <a moz-do-not-send="true"
href="http://archive.ubuntu.com/ubuntu/dists/precise-security/Release.gpg">http://archive.ubuntu.com/ubuntu/dists/precise-security/Release.gpg</a>
Temporary failure resolving '<a moz-do-not-send="true"
href="http://archive.ubuntu.com">archive.ubuntu.com</a>'</div>
<div><br>
</div>
<div>W: Some index files failed to download. They have been
ignored, or old ones used instead.</div>
<br>
<div class="gmail_quote">On Wed, Dec 5, 2012 at 1:00 PM, Kieran
Grant <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:kieran.thehacker.grant@gmail.com"
target="_blank">kieran.thehacker.grant@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">On 05/12/12 17:01, David Henningsson wrote:<br>
> On 12/04/2012 03:14 PM, Emmet Hikory wrote:<br>
>> Saqlain Abbas wrote:<br>
>>> I have installed Ubuntu core on VM i followed
instruction from<br>
>>><br>
>>> <a moz-do-not-send="true"
href="https://wiki.ubuntu.com/Core" target="_blank">https://wiki.ubuntu.com/Core</a><br>
>>><br>
>>> I am able to boot and login, but if try
apt-get install I get below<br>
>>> errors,<br>
>>> my system (virgin ubuntu core) got no
packages installed like synaptic<br>
>>> package manager etc<br>
>>><br>
>>> "could not open lock file /var/lib/dpkg/lock
-open (13:permission<br>
>>> denied)<br>
>>> unable to lock the administration directory
(/var/lib/dpkg) , are<br>
>>> you root?"<br>
>>><br>
>>> I can't try using "sudo" command as it is not
installed on (ubuntu<br>
>>> core).<br>
>><br>
>> If you wish to run apt-get, you will either
need to grant a root<br>
>> password,<br>
>> and use su, or mount the filesystem on some other
machine, chroot<br>
>> into it, and<br>
>> install sudo from the chroot.<br>
>><br>
>>> [T]he user i created "ubuntu" I added it to
adm and sudo groups,<br>
>>> "groups" command shows it is added to
"ubuntu" "adm" and "sudo"<br>
>>> groups. My<br>
>>> other part of question is as user is added to
sudo group why i got no<br>
>>> "root" permission?<br>
>><br>
>> Because the sudo package is not installed,
so there is no<br>
>> interpretation<br>
>> of the sudo group meaning anything. While the
adm group does grant<br>
>> the ability<br>
>> to access many files, it does not provide for any
sort of root access.<br>
>><br>
><br>
> The instructions at <a moz-do-not-send="true"
href="https://wiki.ubuntu.com/Core" target="_blank">https://wiki.ubuntu.com/Core</a>
clearly says to add<br>
> the local user to the sudo group. This makes no sense
if the sudo<br>
> package is not part of Ubuntu Core, so either the
instructions are<br>
> broken, or Ubuntu Core is broken because it should
have included the<br>
> sudo package?<br>
><br>
</div>
</div>
The answers provided are correct, but you need to add sudo
package manually.<br>
<br>
Download ubuntu-core, as directed, and if you want to use it
in an<br>
image, say for example a VM (this is pretty much what I do):<br>
Pre-download or pre-build Linux Kernel Debs (Download is
easier)<br>
host$ dd if=/dev/zero bs=1 seek=size-in-bytes count=1
of=./image<br>
host$ su<br>
host# mkdir mnt<br>
host# mkfs.ext{2,3,4} -f ./image<br>
host# mount ./image mnt<br>
host# cd mnt<br>
host# tar -xvnf ../ubuntu-core-{version}-core-{arch}.tar.gz<br>
host# cd ..<br>
host# cp /path/to/kernel/debs mnt/var/cache/apt/archives<br>
host# chroot mnt<br>
chroot# dpkg -i /var/cache/apt/archives/*.deb<br>
chroot# apt-get update && apt-get upgrade<br>
chroot# apt-get install net-tools sudo vim{/other editor of
choice}<br>
{aptitude/other package manager if you want} {and anything
else you feel<br>
you need}<br>
chroot# apt-get clean<br>
chroot# adduser username<br>
chroot# addgroup username adm<br>
chroot# addgroup username sudo<br>
chroot# add<br>
chroot# exit<br>
host# cd ..<br>
host# cp mnt/boot/vmlin* . && cp mnt/boot/init* . #
copy kernel and init<br>
image to outside chroot<br>
host# umount mnt<br>
host# exit<br>
host$ kvm -m 512M -vga std -soundhw ac97,sb16 -smp<br>
{n},sockets=1,threads=1,cores={n} -kernel vmlinux-... -initrd
initrd-...<br>
-append "vga=ask root=/dev/sda" hda=image -daemonize<br>
<br>
(Also look at <a moz-do-not-send="true"
href="https://wiki.ubuntu.com/Core/InstallationExample"
target="_blank">https://wiki.ubuntu.com/Core/InstallationExample</a>)<br>
<br>
Or you can skip the whole image creation process, just extract<br>
ubuntu-core as root into empty directory and do similar
process, then<br>
you can tar archive it later to send to a target computer
(using a Live USB)<br>
<br>
The only thing of note I have, is that today I had a phantom
bug that if<br>
I change my /etc/apt/sources.list file (in chroot) to point to
somewhere<br>
else it fails (Does the ubuntu-core know the ip address of<br>
<a moz-do-not-send="true" href="http://archive.ubuntu.com"
target="_blank">archive.ubuntu.com</a>? as there is no
nslookup package installed in core to<br>
lookup alt mirrors)<br>
<br>
From,<br>
Kieran Grant<br>
<div class="HOEnZb">
<div class="h5"><br>
--<br>
Ubuntu-devel-discuss mailing list<br>
<a moz-do-not-send="true"
href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com">Ubuntu-devel-discuss@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a
moz-do-not-send="true"
href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss"
target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
</blockquote>
</body>
</html>