Friday, September 7, 2007

GRUB Boot floppy or CD
Taken from here.
http://newbiedoc.berlios.de/wiki/How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system

1 The advantage of having a Grub boot disc

If you have more than one operating system on a dual- or multi-boot Debian system, you run a small risk of damaging the Grub bootloader. This might happen if another operating system overwrites the boot sector. It might also happen if you have several versions of Debian on different partitions and you remove one of them. The answer is to create a Grub boot disc (floppy or CD) that will boot into Debian on a partition that you know will never be moved or removed.

2 Create a boot floppy

The way to create a Grub boot floppy for Debian, based on the article at http://www.linuxjournal.com/comment/reply/4622, is as follows.

Boot into your Debian system. If you have more than one, boot into the system that you know will remain permanently on your hard drive. Insert a floppy disc in your floppy drive and format it. Add a file system. This could be anything that Debian will recognise (eg ext2), but these commands will add an MSDOS filesystem.

fdformat /dev/fd0
mkfs -t msdos /dev/fd0

Mount the floppy and copy the /boot/grub directory and its contents from the running system to the floppy. Unmount the floppy.

$ mount -t msdos /dev/fd0 /media/floppy
$ mkdir -p /media/floppy/boot/grub
$ cp /boot/grub/* /media/floppy/boot/grub
$ umount /media/floppy

Install the GRUB boot loader in the MBR of the floppy itself. Run grub and enter these commands at the grub prompt.

$ grub
grub> root (fd0)
grub> setup (fd0)
grub> quit

That's it! To test the floppy, restart the system with the floppy in the drive. You can select which operating system to boot from the usual blue menu.

3 Create a boot CD

You can find basic instructions for creating a bootable Grub disc in the manual at http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html#Making-a-GRUB-bootable-CD_002dROM. By adding a slightly modified menu.lst you can create a CD which will boot your system from the usual blue menu.

In your "home" directory create a directory (eg "iso") in which to place the files for the CD.

$ cd ~
$ mkdir iso

Make a directory for Grub and copy the file "stage2_eltorito" to it from /usr/lib/grub/i386-pc/.

$ mkdir -p iso/boot/grub
$ cp /usr/lib/grub/i386-pc/stage2_eltorito iso /boot/grub

Also copy the menu.lst file to it from /boot/grub.

cp /boot/grub/menu.lst iso/boot/grub 

Now edit iso/boot/grub/menu.lst and remove any lines identical to "savedefault". Leaving these commands will cause an error because the CD is a read-only disc. A typical menu entry will look like this once "savedefault" has been removed:

title		Debian GNU/Linux, kernel 2.6.18-3-686
root (hd0,5)
kernel /boot/vmlinuz-2.6.18-3-686 root=/dev/hda6 ro
initrd /boot/initrd.img-2.6.18-3-686

Finally, make a ISO9660 image file called "grub.iso".

$ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot 
-boot-load-size 4 -boot-info-table -o grub.iso iso

Burn the image file onto CD or a DVD. If you are using K3B or GnomeBaker, choose "Burn CDROM Image" from the "Tools" menu. If you are using the command line, you can use cdrecord. There is an explanation of how to do this at http://www.debian-administration.org/articles/273.

Note
Note:
mkisofs has already set up the disc to boot from the boot/grub/stage2_eltorito file, so there is no need to setup GRUB on the disc. The -boot-load-size 4 bit is required for compatibility with the BIOS on many older machines.

That's it! To test the CD, restart the system with the CD in the drive. You can select which operating system to boot from the usual blue menu.

4 How to use the Grub boot disc to repair the MBR

--Chris Lale 15:32, 2 March 2007 (CET)

Your system may stop booting from the hard drive if you install Windows or install another instance of Debian and then remove it.

Just boot from your Grub floppy or CD, login, switch user to user root and re-install the Grub bootloader. If your first master hard disc is IDE, enter

# grub-install /dev/hda

If your first master hard disc is SCSI or SATA, use

# grub-install /dev/sda


Data from my Linspire partition on hda6.

user@user:/mnt$ cd /mnt/hda6
user@user:/mnt/hda6$ ls -l
total 69
-rw-r--r-- 1 root root 938 2007-08-11 15:12 %1
-rw-r--r-- 1 root root 17 2005-03-16 13:28 base.tgz.size
drwxr-xr-x 2 root root 2168 2005-06-06 21:17 bin
drwxr-xr-x 3 root root 576 2007-03-26 12:39 boot
drwxr-xr-x 2 root root 48 2006-04-13 10:06 cdrom0
drwxr-xr-x 2 root root 48 2006-04-13 10:06 cdrom1
-rw------- 1 root root 1348 2004-06-25 09:11 config.dat-old
drwxr-xr-x 3 root root 144 2005-03-16 13:28 dev
drwxr-xr-x 5 root root 120 2006-12-04 13:38 disks
drwxr-xr-x 156 root root 8424 2007-09-02 15:22 etc
drwxr-xr-x 2 root root 48 2006-04-13 10:06 floppy1
drwxr-xr-x 2 root root 48 2006-04-13 10:06 floppy2
drwxr-xr-x 2 root root 48 2006-04-13 10:06 hda6
drwxrwsr-x 3 1000 1000 72 2005-10-12 00:11 home
drwxr-xr-x 2 root root 48 2005-03-16 13:14 initrd
drwxr-xr-x 13 root root 4504 2007-04-27 11:29 lib
-rwxr-xr-x 1 root root 1390 2004-04-01 05:21 makedeb
drwxr-xr-x 2 root root 48 2005-03-16 13:14 media
drwxr-xr-x 50 root root 1328 2007-09-01 18:11 mnt
lrwxrwxrwx 1 root 1000 22 2007-08-12 16:54 My Computer -> /home/paul/My Computer
drwxr-xr-x 9 root root 224 2007-08-05 18:00 opt
drwxr-xr-x 2 root root 48 2004-11-12 15:04 proc
-rw-r--r-- 1 root root 328 2003-09-05 11:29 README.txt
drwxr-xr-x 58 root root 3536 2007-09-02 15:22 root
dr-xr-xr-x 2 root root 48 2005-03-16 13:33 rr_moved
drwxr-xr-x 2 root root 8688 2007-04-05 20:11 sbin
drwxr-xr-x 2 root root 48 2005-03-16 13:14 srv
drwxr-xr-x 7 root root 168 2005-06-09 10:17 storix
-rw-r--r-- 1 root root 9290 2004-04-15 07:38 storix.admin.list
-rw-r--r-- 1 root root 4262 2004-04-15 07:38 storix.client.list
-rw-r--r-- 1 root root 0 2004-03-31 13:15 storix.cl.list
-rw-r--r-- 1 root root 0 2004-03-31 13:15 storix.na.list
drwxr-xr-x 2 root root 48 2004-12-05 08:13 sys
drwxrwxrwt 13 root root 568 2007-09-02 15:22 tmp
drwxr-xr-x 20 root root 552 2006-10-01 23:49 usr
drwxr-xr-x 22 root root 528 2006-07-28 11:16 var
lrwxrwxrwx 1 root root 19 2005-05-06 13:43 vmlinuz -> boot/vmlinuz-2.6.10

user@user:/mnt/hda6$ cd /mnt/hda6/boot/grub/
user@user:/mnt/hda6/boot/grub$ ls -l
total 420
-rw-r--r-- 1 root root 4008 2005-01-31 10:47 bootsplash.xpm.gz
-rw-r--r-- 1 root root 7776 2005-02-19 11:35 e2fs_stage1_5
-rw-r--r-- 1 root root 7504 2005-02-19 11:35 fat_stage1_5
-rw-r--r-- 1 root root 8320 2005-02-19 11:35 jfs_stage1_5
-rw-r--r-- 1 root root 1342 2006-04-14 04:59 menu.lst~
-rw-r--r-- 1 root root 221 2006-04-14 10:56 menu.lst.bak
-rw-r--r-- 1 root root 1601 2006-04-14 16:31 menu.lst.bak~
-rw-r--r-- 1 root root 221 2006-04-14 10:48 menu.lst.bak~~
-rw-r--r-- 1 root root 1601 2007-06-25 21:15 menu.lst.bak2
-rw-r--r-- 1 root root 221 2007-06-25 21:10 menu.lst.bak3
-rw-r--r-- 1 root root 1142 2006-04-28 12:48 menu.lst.good
-rw-r--r-- 1 root root 1429 2006-12-10 15:01 menu.lst.saved
-rw-r--r-- 1 root root 7008 2005-02-19 11:35 minix_stage1_5
-rw-r--r-- 1 root root 39428 2005-02-19 11:35 reiser4_stage1_5
-rw-r--r-- 1 root root 9216 2005-02-19 11:35 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 2005-02-19 11:35 stage1
-rw-r--r-- 1 root root 141412 2005-02-19 11:35 stage2
-rw-r--r-- 1 root root 141412 2005-02-19 11:35 stage2_eltorito
-rw-r--r-- 1 root root 9256 2005-02-19 11:35 xfs_stage1_5

user@user:/mnt/hda6/boot/grub$ cat menu.lst.good
# Generated by jiffyboot version 7.0.53. If this file is edited, the
# system will stop modifying it. To allow the system to resume
# management of this file, remove it and run /sbin/jiffyboot

default=0
timeout=10
color cyan/green magenta/green
splashimage=/boot/grub/bootsplash.xpm.gz

title Linspire 5.0.59 on /dev/hda6
root (hd0,5)
kernel /boot/vmlinuz-2.6.10 root=/dev/hda6 rootdev=0x0306 ramdisk=32000 vga=0x311 splash=silent video=vesafb:nomtrr video=vesafb:nomtrr jiffymount=noatime
initrd /boot/initrd-2.6.10.gz
# (Boot priority: 102, mounted at /)

title Redetect
root (hd0,5)
kernel /boot/vmlinuz-2.6.10 root=/dev/hda6 rootdev=0x0306 ramdisk=32000 noresume2 redetect video=vesafb:nomtrr video=vesafb:nomtrr jiffymount=noatime
initrd /boot/initrd-2.6.10.gz
# (Boot priority: 102, mounted at /)

title Diagnostics
root (hd0,5)
kernel /boot/vmlinuz-2.6.10 root=/dev/hda6 rootdev=0x0306 ramdisk=32000 noresume2 single splash=0 Diagnostics video=vesafb:nomtrr video=vesafb:nomtrr jiffymount=noatime
initrd /boot/initrd-2.6.10.gz
# (Boot priority: 102, mounted at /)

title MS Windows 98 on /dev/hda1
root (hd0,0)
chainloader +1

user@user:/mnt/hda6/boot/grub$

Menu.lst from Ubuntu 7.04 on hdb

# Taken from Ubuntu 7.04 installation, on hdb? therefore 'root (hd0,0)' has to be wrong.
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 20

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the Debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=9cca91b7-96a4-4cf9-b8cb-3dd1ab1c6730 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurrence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=9cca91b7-96a4-4cf9-b8cb-3dd1ab1c6730 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=9cca91b7-96a4-4cf9-b8cb-3dd1ab1c6730 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Note: I think that the value '(hd0,0)' here is in error!

Note : I think that the last installation, Debian Netinstall, used what was hdb1 but has now been reallocated to hdb12 as root, hdb13 as /home and hdb14 as /user. The latter is a trial of having a common data file between installed versions of Linux.

I am now going to build a boot floppy

Thursday, August 2, 2007

Output from konsole window, configuring and installing zsync

PAULS:/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether compiler supports -Wwrite-strings... yes
checking whether compiler supports -Winline... yes
checking whether compiler supports -Wextra... no
checking whether compiler supports -Winline... yes
checking whether compiler supports -Wmissing-noreturn... yes
checking whether compiler supports -Wredundant-decls... yes
checking whether compiler supports -Wnested-externs... yes
checking whether compiler supports -Wundef... yes
checking whether compiler supports -Wbad-function-cast... yes
checking whether compiler supports -Wcast-align... yes
checking whether compiler supports -Wvolatile-register-var... no
checking whether compiler supports -ffast-math... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for size_t... yes
checking for memcpy... yes
checking for pwrite... yes
checking for socklen_t... yes
checking for in_port_t... yes
checking for h_errno declaration in netdb.h... yes
checking for socket in -lsocket... no
checking for getaddrinfo... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... 1
checking for fseeko... yes
checking for size_t... (cached) yes
checking size of size_t... 4
checking for off_t... yes
checking size of off_t... 8
checking if malloc debugging is wanted... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating librcksum/Makefile
config.status: creating zlib/Makefile
config.status: creating libzsync/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
PAULS:/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5# make
make all-recursive
make[1]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5'
Making all in librcksum
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/librcksum'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT rsum.o -MD -MP -MF ".deps/rsum.Tpo
" -c -o rsum.o rsum.c;
then mv -f ".deps/rsum.Tpo" ".deps/rsum.Po"; else rm -f ".deps/rsum.Tpo"; exit 1
; fi
In file included from rsum.c:25:
md4.h:39: warning: `__bounded__' attribute directive ignored
md4.h:42: warning: `__bounded__' attribute directive ignored
md4.h:45: warning: `__bounded__' attribute directive ignored
md4.h:45: warning: `__bounded__' attribute directive ignored
md4.h:47: warning: `__bounded__' attribute directive ignored
md4.h:49: warning: `__bounded__' attribute directive ignored
md4.h:51: warning: `__bounded__' attribute directive ignored
md4.h:54: warning: `__bounded__' attribute directive ignored
md4.h:54: warning: `__bounded__' attribute directive ignored
rsum.c: In function `write_blocks':
rsum.c:93: warning: implicit declaration of function `pwrite'
rsum.c: In function `rcksum_read_known_data':
rsum.c:116: warning: implicit declaration of function `pread'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT hash.o -MD -MP -MF ".deps/hash.Tpo
" -c -o hash.o hash.c;
then mv -f ".deps/hash.Tpo" ".deps/hash.Po"; else rm -f ".deps/hash.Tpo"; exit 1
; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT state.o -MD -MP -MF ".deps/state.T
po" -c -o state.o state.c;
then mv -f ".deps/state.Tpo" ".deps/state.Po"; else rm -f ".deps/state.Tpo"; exi
t 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT range.o -MD -MP -MF ".deps/range.T
po" -c -o range.o range.c;
then mv -f ".deps/range.Tpo" ".deps/range.Po"; else rm -f ".deps/range.Tpo"; exi
t 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT md4.o -MD -MP -MF ".deps/md4.Tpo"
-c -o md4.o md4.c;
then mv -f ".deps/md4.Tpo" ".deps/md4.Po"; else rm -f ".deps/md4.Tpo"; exit 1; f
i
In file included from md4.c:27:
md4.h:39: warning: `__bounded__' attribute directive ignored
md4.h:42: warning: `__bounded__' attribute directive ignored
md4.h:45: warning: `__bounded__' attribute directive ignored
md4.h:45: warning: `__bounded__' attribute directive ignored
md4.h:47: warning: `__bounded__' attribute directive ignored
md4.h:49: warning: `__bounded__' attribute directive ignored
md4.h:51: warning: `__bounded__' attribute directive ignored
md4.h:54: warning: `__bounded__' attribute directive ignored
md4.h:54: warning: `__bounded__' attribute directive ignored
rm -f librcksum.a
ar cru librcksum.a rsum.o hash.o state.o range.o md4.o
ranlib librcksum.a
make[2]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/librcksum'
Making all in zlib
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/zlib'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT inflate.o -MD -MP -MF ".deps/infla
te.Tpo" -c -o inflate.o inflate.c;
then mv -f ".deps/inflate.Tpo" ".deps/inflate.Po"; else rm -f ".deps/inflate.Tpo
"; exit 1; fi
inflate.c:101: warning: redundant redeclaration of `updatewindow' in same scope
zlib.h:1155: warning: previous declaration of `updatewindow'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT adler32.o -MD -MP -MF ".deps/adler
32.Tpo" -c -o adler32.o adler32.c;
then mv -f ".deps/adler32.Tpo" ".deps/adler32.Po"; else rm -f ".deps/adler32.Tpo
"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT inftrees.o -MD -MP -MF ".deps/inft
rees.Tpo" -c -o inftrees.o inftrees.c;
then mv -f ".deps/inftrees.Tpo" ".deps/inftrees.Po"; else rm -f ".deps/inftrees.
Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT zutil.o -MD -MP -MF ".deps/zutil.T
po" -c -o zutil.o zutil.c;
then mv -f ".deps/zutil.Tpo" ".deps/zutil.Po"; else rm -f ".deps/zutil.Tpo"; exi
t 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT crc32.o -MD -MP -MF ".deps/crc32.T
po" -c -o crc32.o crc32.c;
then mv -f ".deps/crc32.Tpo" ".deps/crc32.Po"; else rm -f ".deps/crc32.Tpo"; exi
t 1; fi
rm -f libinflate.a
ar cru libinflate.a inflate.o adler32.o inftrees.o zutil.o crc32.o
ranlib libinflate.a
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT deflate.o -MD -MP -MF ".deps/defla
te.Tpo" -c -o deflate.o deflate.c;
then mv -f ".deps/deflate.Tpo" ".deps/deflate.Po"; else rm -f ".deps/deflate.Tpo
"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT compress.o -MD -MP -MF ".deps/comp
ress.Tpo" -c -o compress.o compress.c;
then mv -f ".deps/compress.Tpo" ".deps/compress.Po"; else rm -f ".deps/compress.
Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT trees.o -MD -MP -MF ".deps/trees.T
po" -c -o trees.o trees.c;
then mv -f ".deps/trees.Tpo" ".deps/trees.Po"; else rm -f ".deps/trees.Tpo"; exi
t 1; fi
rm -f libdeflate.a
ar cru libdeflate.a deflate.o compress.o trees.o
ranlib libdeflate.a
make[2]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/zlib'
Making all in libzsync
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/libzsync'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT zsync.o -MD -MP -MF ".deps/zsync.T
po" -c -o zsync.o zsync.c;
then mv -f ".deps/zsync.Tpo" ".deps/zsync.Po"; else rm -f ".deps/zsync.Tpo"; exi
t 1; fi
In file included from zsync.c:29:
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:36: warning: `__bounded__' attribute directive ignored
sha1.h:38: warning: `__bounded__' attribute directive ignored
sha1.h:40: warning: `__bounded__' attribute directive ignored
sha1.h:42: warning: `__bounded__' attribute directive ignored
sha1.h:44: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
zsync.c: In function `zsync_get_urls':
zsync.c:234: warning: return from incompatible pointer type
zsync.c:237: warning: return from incompatible pointer type
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT zmap.o -MD -MP -MF ".deps/zmap.Tpo
" -c -o zmap.o zmap.c;
then mv -f ".deps/zmap.Tpo" ".deps/zmap.Po"; else rm -f ".deps/zmap.Tpo"; exit 1
; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT sha1.o -MD -MP -MF ".deps/sha1.Tpo
" -c -o sha1.o sha1.c;
then mv -f ".deps/sha1.Tpo" ".deps/sha1.Po"; else rm -f ".deps/sha1.Tpo"; exit 1
; fi
In file included from sha1.c:23:
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:36: warning: `__bounded__' attribute directive ignored
sha1.h:38: warning: `__bounded__' attribute directive ignored
sha1.h:40: warning: `__bounded__' attribute directive ignored
sha1.h:42: warning: `__bounded__' attribute directive ignored
sha1.h:44: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
rm -f libzsync.a
ar cru libzsync.a zsync.o zmap.o sha1.o
ranlib libzsync.a
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -g -Wall -I.. -Wwrite-strings -Wi
nline -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wb
ad-function-cast -Wcast-align -ffast-math -MT sha1test.o -MD -MP -MF ".deps/sha1
test.Tpo" -c -o sha1test.o sha1test.c;
then mv -f ".deps/sha1test.Tpo" ".deps/sha1test.Po"; else rm -f ".deps/sha1test.
Tpo"; exit 1; fi
In file included from sha1test.c:19:
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:34: warning: `__bounded__' attribute directive ignored
sha1.h:36: warning: `__bounded__' attribute directive ignored
sha1.h:38: warning: `__bounded__' attribute directive ignored
sha1.h:40: warning: `__bounded__' attribute directive ignored
sha1.h:42: warning: `__bounded__' attribute directive ignored
sha1.h:44: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
sha1.h:47: warning: `__bounded__' attribute directive ignored
sha1test.c:25: warning: return type of `main' is not `int'
gcc -g -O2 -g -Wall -I.. -Wwrite-strings -Winline -Winline -Wmissing-noreturn -
Wredundant-decls -Wnested-externs -Wundef -Wbad-function-cast -Wcast-align -ffas
t-math -o sha1test sha1.o sha1test.o
make[2]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/libzsync'
Making all in doc
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/doc'
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT make.o -MD -MP -MF ".deps/make.Tpo"
-c -o make.o make.c;
then mv -f ".deps/make.Tpo" ".deps/make.Po"; else rm -f ".deps/make.Tpo"; exit 1
; fi
In file included from make.c:36:
libzsync/sha1.h:34: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:34: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:36: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:38: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:40: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:42: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:44: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:47: warning: `__bounded__' attribute directive ignored
libzsync/sha1.h:47: warning: `__bounded__' attribute directive ignored
make.c: In function `do_zstream':
make.c:134: warning: passing arg 1 of `skip_zhead' discards qualifiers from poin
ter target type
make.c: In function `main':
make.c:529: warning: suggest explicit braces to avoid ambiguous `else'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT makegz.o -MD -MP -MF ".deps/makegz.T
po" -c -o makegz.o makegz.c;
then mv -f ".deps/makegz.Tpo" ".deps/makegz.Po"; else rm -f ".deps/makegz.Tpo";
exit 1; fi
gcc -g -O2 -g -Wall -I. -Wwrite-strings -Winline -Winline -Wmissing-noreturn -W
redundant-decls -Wnested-externs -Wundef -Wbad-function-cast -Wcast-align -ffast
-math -o zsyncmake make.o makegz.o libzsync/libzsync.a librcksum/librcksum.a
zlib/libinflate.a zlib/libdeflate.a -lm
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT client.o -MD -MP -MF ".deps/client.T
po" -c -o client.o client.c;
then mv -f ".deps/client.Tpo" ".deps/client.Po"; else rm -f ".deps/client.Tpo";
exit 1; fi
client.c: In function `main':
client.c:312: warning: passing arg 2 of `append_ptrlist' from incompatible point
er type
client.c:312: warning: assignment from incompatible pointer type
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT http.o -MD -MP -MF ".deps/http.Tpo"
-c -o http.o http.c;
then mv -f ".deps/http.Tpo" ".deps/http.Po"; else rm -f ".deps/http.Tpo"; exit 1
; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT url.o -MD -MP -MF ".deps/url.Tpo" -c
-o url.o url.c;
then mv -f ".deps/url.Tpo" ".deps/url.Po"; else rm -f ".deps/url.Tpo"; exit 1; f
i
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT progress.o -MD -MP -MF ".deps/progre
ss.Tpo" -c -o progress.o progress.c;
then mv -f ".deps/progress.Tpo" ".deps/progress.Po"; else rm -f ".deps/progress.
Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -g -Wall -I. -Wwrite-strings -Winl
ine -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad
-function-cast -Wcast-align -ffast-math -MT base64.o -MD -MP -MF ".deps/base64.T
po" -c -o base64.o base64.c;
then mv -f ".deps/base64.Tpo" ".deps/base64.Po"; else rm -f ".deps/base64.Tpo";
exit 1; fi
gcc -g -O2 -g -Wall -I. -Wwrite-strings -Winline -Winline -Wmissing-noreturn -W
redundant-decls -Wnested-externs -Wundef -Wbad-function-cast -Wcast-align -ffast
-math -o zsync client.o http.o url.o progress.o base64.o libzsync/libzsync.a
librcksum/librcksum.a zlib/libinflate.a
make[2]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5'
make[1]: Leaving directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5'
PAULS:/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5# make install
Making install in librcksum
make[1]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/librcksum'
make[2]: Entering directory `/mnt/hdb6/Klikit_Linux/zsync/zsync-0.5/librcksum'
make[2]: Nothing to be done for `install-exec-am'.

Compile & Use zsync

I am wanting to update a 1 GB ISO file for klikit-linux. I originally downloaded an alpha version but was unable to install it. The latest release has overcome these initial installation problems but I do not want to download the entire 1024 MB of data again. Someone has kindly provided and hosted a zsync meta-file, at http://www.nrvitsquad.com/klikit/klikit-ff-0.1-5b.iso.zsync
and all that remains is to compile, install and run the zsync client.

This is the first time I have attempted to compile and install a program in Linux, being a Linspire user and restricted to their CNR technology up until now. However their CNR warehouse has become more and more out of date and does not currently host zsync.

My first attempt at compiling went well but produced some errors, which I do not understand. Here is a link to the konsole output.

http://docs.google.com/Doc?id=ddw429pm_10hjpxcm

Paul
Auckland, NZ
Fri Aug 3 11:50 am 2007