<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<copyright>Copyright 1998 - 2023 DPG Media B.V.</copyright>
		<pubDate>Thu, 12 Jan 2023 04:06:59 GMT</pubDate>
		<lastBuildDate>Thu, 12 Jan 2023 04:06:59 GMT</lastBuildDate>
		<docs>https://tweakers.net/reviews/76</docs>
		<description>Tweakblogs.net is the weblog service provided by Tweakers, the largest hardwaresite and techcommunity in the Netherlands.</description>
		<image>
			<link>https://tweakblogs.net/</link>
			<title>Tweakblogs.net</title>
			<url>https://tweakers.net/g/if/logo.gif</url>
			<height></height><width></width>
			<description>Tweakblogs.net</description>
		</image>
		<language>en</language>
		<link>https://vanaalten.tweakblogs.net</link>
		<title>Untitled</title>
		<webMaster>gathering@tweakers.net</webMaster>
		<item>
			<title>Custom Debian live ISO</title>
			<link>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275912</link>
			<description>@sfranken
&quot;Don&#039;t use backticks anymore, that&#039;s been deprecated for quite a while.&quot;
I know. I just can&#039;t get used to the $(...) notation. Too much typing! 

But good point about copying the current resolv.conf - makes the script at least easier to reuse by others. I&#039;ll probably update the blog somewhere in the near future with all these minor changes.</description><dc:creator>vanaalten</dc:creator>
			<category></category>
			<comments>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275912#reacties</comments>
			<guid isPermaLink="false">https://vanaalten.tweakblogs.net/blog/19686#r_275912</guid>
			<pubDate>Fri, 15 Oct 2021 09:28:51 GMT</pubDate>
		</item>
		<item>
			<title>Custom Debian live ISO</title>
			<link>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275910</link>
			<description>Don&#039;t use backticks anymore, that&#039;s been deprecated for quite a while. Use $(...) for shell commands and ${...} for variables, like so:

code:1
2
3
4
5
6
7
8
9
10
#!/bin/bash

iso=$(wget -O - -o /dev/null https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid | grep amd64-gnome.iso | sed &#039;s/^.*a href=&quot;//;s/&quot;.*$//&#039;)

if [[ ${?} -ne 0 ]]; then
    echo &quot;Couldn&#039;t determine Debian ISO filename.&quot;
    exit 2
fi

newiso=$(echo ${iso} | sed &#039;s/gnome/gnome-personal/&#039;)

For the resolv.conf thing, you can also copy the current one:

code:1
sudo cp -v --dereference /etc/resolv.conf squashfs/etc/resolv.conf</description><dc:creator>sfranken</dc:creator>
			<category></category>
			<comments>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275910#reacties</comments>
			<guid isPermaLink="false">https://vanaalten.tweakblogs.net/blog/19686#r_275910</guid>
			<pubDate>Fri, 15 Oct 2021 09:11:25 GMT</pubDate>
		</item>
		<item>
			<title>Custom Debian live ISO</title>
			<link>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275908</link>
			<description>@eXcyle
 Clear, thanks! And indeed, just tested the live image and the nameserver is hard coded in /etc/resolv.conf - so better to remove it.</description><dc:creator>vanaalten</dc:creator>
			<category></category>
			<comments>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275908#reacties</comments>
			<guid isPermaLink="false">https://vanaalten.tweakblogs.net/blog/19686#r_275908</guid>
			<pubDate>Fri, 15 Oct 2021 07:01:09 GMT</pubDate>
		</item>
		<item>
			<title>Custom Debian live ISO</title>
			<link>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275904</link>
			<description>code:1
echo &quot;nameserver 192.168.1.1&quot; &gt; squashfs/etc/resolv.conf
Not sure why the first line is needed - but if I don&#039;t add this, running &#039;apt&#039; in the chroot environment later on doesn&#039;t work because it cannot resolve the URL for the Debian repositories.when you use the chroot command, you change the root directory ( / and all relative subdirectories beneath it) for the command that follows to the directory you specified ( /root/squashfs/ ).

code:1
chroot squashfs /bin/bash -c &quot;apt -y update &amp;&amp; apt -y upgrade &amp;&amp; apt -y autoremove&quot;
so using this command you start /bin/bash and set/redirect the root directory to be your /root/squashfs directory

When the apt command runs within the bash shell you just spawned, it tries to locate your nameserver by reading the /etc/resolv.conf file, but because of the chroot, it is actualy reading the content from /root/squashfs/etc/resolv.conf, and not the /etc/resolv.conf file from your normal OS filesystem.

Without the chroot command apt would install the software into your actual system and not the new LiveCD filesystem.

You might also want to remove the nameserver line from the &quot;/root/squashfs/etc/resolv.conf&quot; file when you are done, otherwise the nameserver would be hardcoded into the new live cd (it should get overwritten by the dhcp-service, but still</description><dc:creator>eXcyle</dc:creator>
			<category></category>
			<comments>https://vanaalten.tweakblogs.net/blog/19686/custom-debian-live-iso#r_275904#reacties</comments>
			<guid isPermaLink="false">https://vanaalten.tweakblogs.net/blog/19686#r_275904</guid>
			<pubDate>Thu, 14 Oct 2021 22:37:53 GMT</pubDate>
		</item>
	</channel>
</rss>