# The Ubuntu Forum Community > Other Discussion and Support > Documentation and Community Wiki Discussions >  Discussion - https://help.ubuntu.com/community/MakeALiveCD/DVD/BootableFlashFromHardd

## nothingspecial

Please use this thread for discussion regarding

https://help.ubuntu.com/community/Ma...arddiskInstall

Support threads should be posted in normal forums.

Thank you.

----------


## c4c

:Wink:

----------


## itagomo

I'm now on the part "_C. Chroot into the new system and modify it:"_

whenever I do update, I'm getting this error





> ```
> root@ubuntu:/# apt-get update
> ```
> 
> Ign cdrom://Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424) raring Release.gpg
> Ign cdrom://Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424) raring Release                     
> Err http://dl.google.com stable Release.gpg                                                             
>   Something wicked happened resolving 'dl.google.com:http' (-11 - System error)
> Ign http://dl.google.com stable Release                                                                 
> ...


can't find any fix

----------


## Kamil_Jwiak

Hi there.

I need some help with creating bootable CD/DVD based on installed version of Ubuntu.

The last step ends with the error on my machine.



> _E. Build the CD/DVD_
> 1. Make the ISO file
> 
> 
> ```
> sudo grub-mkrescue -o ~/live-cd.iso ${CD}
> ```




```
grub-mkrescue -o
```

seems to be not available anymore so I was trying to use --output, but then I get en error


```
sudo grub-mkrescue --output=~/ISO.iso ${CD}
```




> Enabling BIOS support ...
> Using MULTIBOO.000;1 for /tmp/grub-mkrescue.xaZXtfoLhU/boot/grub/i386-pc/multiboot2.mod (multiboot.mod)
> Using GCRY_SHA.000;1 for /tmp/grub-mkrescue.xaZXtfoLhU/boot/grub/i386-pc/gcry_sha1.mod (gcry_sha256.mod)
> Using GCRY_SHA.001;1 for /tmp/grub-mkrescue.xaZXtfoLhU/boot/grub/i386-pc/gcry_sha256.mod (gcry_sha512.mod)
> Using PASSWORD.000;1 for /tmp/grub-mkrescue.xaZXtfoLhU/boot/grub/i386-pc/password.mod (password_pbkdf2.mod)
> Using SEARCH_F.000;1 for /tmp/grub-mkrescue.xaZXtfoLhU/boot/grub/i386-pc/search_fs_file.mod (search_fs_uuid.mod)
> grub-mkisofs: Unable to open disc image file
> : No such file or directory



According to kababbaro post i have changed chmod to +r recursively to all files.
I doesn't change anything. I still get error message posted above.

Can you help me fix this issue?
I'm using /usr/bin/grub-mkrescue (GNU GRUB 1.98-1ubuntu13) on Ubuntu 10.04 32-bit.

Best Regards,
Kamil

----------


## Slippy Lane

I found the answer here

Specifically - after mounted dev, proc and sys, but before chroot, I did this:

(I've modified it to fit the guide we're following)




> sudo cp /etc/hosts $WORK/rootfs/etc/hosts
> sudo rm $WORK/rootfs/etc/resolv.conf
> sudo cp /etc/resolv.conf $WORK/rootfs/etc/resolv.conf
> sudo cp /etc/apt/sources.list $WORK/rootfs/etc/apt/sources.list


After doing all that, I chrooted into $WORK/rootfs and the apt-get update and all following steps worked first time.

Hope that helps

----------


## majedaly

Thanks for the extensive information. I tried using the steps described in the wiki, faced the following issues:
1- Unable to connect to internet from the chroot inveronment, which could be overcome by editing resolv.conf and adding a name server
2- During the creation of the CD I get the following warnings:
df: Warning: cannot read table of mounted file systems: No such file or directory
cryptsetup: WARNING: could not determine root device from /etc/fstab
I checked /etc/fstab which appears to be empty.
I completed the steps, ignoring the warnings, and created a live USB stick. it boots normally, but asks for login.
I tried the same username and password used during creation , the root username and password, and user ubuntu with blank password nothing worked.
I repeated the steps, and created a user under the chroot environment , also didn't work
I tried logging in by pressing ALT+F1 but the system doesn't even give the login prompt, it shows authentication error.
I am using Ubuntu 13.10. I tried the same process on a totally different Ubuntu system, with the same result. The ISO file is created, and booting, but asks for a username and password.
I tried even resetting the user password totally under the chroot environment, also didn't work.
Appreciate any help
Thanks

----------


## miker_alpha

> Thanks for the extensive information. I tried using the steps described in the wiki, faced the following issues:
> 1- Unable to connect to internet from the chroot inveronment, which could be overcome by editing resolv.conf and adding a name server
> 2- During the creation of the CD I get the following warnings:
> df: Warning: cannot read table of mounted file systems: No such file or directory
> cryptsetup: WARNING: could not determine root device from /etc/fstab
> I checked /etc/fstab which appears to be empty.
> I completed the steps, ignoring the warnings, and created a live USB stick. it boots normally, but asks for login.
> I tried the same username and password used during creation , the root username and password, and user ubuntu with blank password nothing worked.
> I repeated the steps, and created a user under the chroot environment , also didn't work
> ...


At the stage when you remove non-system users, instead of "998" in the command, use "1000" - that will leave the original installation user defined. Then edit /etc/password (still under chroot)
check for a user with UIC=999 -- there should not be one
In the line defining the user with UIC=1000 edit out the field that defines the password; it should originally be <colon>x<colon> , change it to :: . That user can login with no password. Login at a TTY to create a home directory, e.g.  "sudo mkdir /home/<username> && sudo chown <username>:<username> /home/<username> . You can then complete a graphic login.

----------


## darklordpaunik8880

Hello any one  and thank you  for this  tutorial!!
I was thinking  if it is possible to  create another tutorial  on how to add  grub splash 
i mean to customize  the grub  menu  with custom image..   :Smile: please let me know if it is possible..!!
sorry for my bad  english!!

----------


## Nobody Nessie

Thank you for the whole "topics and wiki". I was looking for something like this for a few weeks to build a more secure and anonymous version of the last Ubuntu. I assumed that a fresh and updated installation of the 14.04 LTS, with only a few needed desktop applications (LibreOffice, GIMP, VLC) and all the needed Internet applications, transmission-GTK, VPN, Tor, Jondo, (and ALL Internet accessing applications getting their enforce Apparmor profiles), some kernel hardening tips and all unnecessary applications and services removed, could give something possibly better than Tails or Whonix (for my own use). In fact, all I need is already on my OS, the only thing I would add for security reason is to build it as a live-CD to avoid it to be hacked.The probability of getting hacked once with a pre-securised live-CD like this is already one thing. Still using this pre-securised live-CD, then the probability of getting hacked twice (with the same exploit, probably) begins to be really an exploit ! (literal meaning). And the possible damages should be closed to nothing, that means the ratio used resources / caused damages would be surely close to be a nonsense.

This is something I still have somewhere in mind as an experiment. I do not know if I will try it one day. Are those topics and wiki updated ? I have seen that remastersys (that seemed to be very efficient to this kind of tasks) is no longer available, for example ?

----------


## thedeco

Before I issue the command:
sudo chroot ${WORK}/rootfs /bin/bash
If I don't do this I don't have DNS in the chroot:
sudo rm ${WORK}/rootfs/etc/resolv.conf
sudo cp /etc/resolv.conf ${WORK}/rootfs/etc/

when I run
apt-get install casper lupin-casperI get a message:
df: Warning: cannot read table of mounted file systems: No such file or directory
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)

I had to do sudo mount --bind /dev/pts ${WORK}/rootfs/dev/pts

After update-initramfs -u -k $(uname -r):df: Warning: cannot read table of mounted file systems: No such file or directory
cryptsetup: WARNING: could not determine root device from /etc/fstab

----------


## matan4

hello ,
i tried to create custom image to Ubuntu 14.4 and i didnt succeeded  
can someone help me with guide to ubuntu server 2014 cli version 
thank you !!!

----------


## pete45

I also experienced a number of the same errors.
I imagine these procedures/scripts have not been updated for newer distros...

I've unfortunately spent a lot of time trying to make this work - but obviously a gamble with antiquated tutorials.
It seems this would be a very desirable feature for many Linux users.

Many great efforts in the past, but no one is maintaining... (Remastersys and similar)
This would be so useful for duplicating a desired environment - but running from RAM via squashfs.

Perhaps I'll try some hybrid approach from these instructions and the UCK approach...

----------


## asafmgn

hello and thanks for this wonderful  tutorial .
in the latest boot cd of lubuntu 15.10 there is the possibility to change keymap before the boot cd load . (see attached screenshot) 
how do i also add it to this custom cd i'm creating with your tutorial?
is it possible?

----------


## jkarurosu

Hi, 

After executing the command "update-initramfs -u -k $(uname -r)" I got a warning saying "df: Warning: cannot read table of mounted file systems: No such file or directory", I'm using a 14.04 distro, below the details.

Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty

Does anyone have seen this issue before?

Regards,

----------


## David_Partridge

I just ran through this with my system again as I recently updated from kernel 4.8.17 to 4.15.0-15-generic on the "strong" suggestion of the btrfs team.

I get the following messages when I try to boot the CD:

/init: . : line 261: can't open /scripts/casper
kernel panic - not syncing: Attempted to kill init!

Help!!!

Thanks
David

----------

