From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 13:58:28 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9CDD1065672; Thu, 7 Jun 2012 13:58:28 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5BA8FC0C; Thu, 7 Jun 2012 13:58:27 +0000 (UTC) Received: by bkvi18 with SMTP id i18so710102bkv.13 for ; Thu, 07 Jun 2012 06:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=wMROMgm6Zi+RcoL2jSNYKaVp4SkyJvQ/24b4LeA0DeE=; b=hoTm+D+sg/AheXzUIDZiSz2zc4hjLM39dqLB6Z0cFcudKaWekQjaEBTy0NufmC4Nzm n2Ajn6iP8sTTkh6EenN/x7XUYH17tBnNo2hSputGniXRm9NbAYLlH7Lt10+IC1Zq0Zbs 9/z9rJOKvRzCesAFhsM1rqhVv/heDVZr5QQgrz82scGCUNYJqYdvEnVpE1UrPItRuevo ytWKYj0tQRaxoOSE9qPWC405QA3uWzNGpRQ9ZQ8Oi7I+WGA2EAabrdxVBBYL/bAk+aFZ 3D1ET4cGJULONRHqHjbbFd5zKe5ovSrj/QFzKfsOzIq2HlLaVJkjiWcElZtfHdSqMLDy H1jQ== Received: by 10.204.145.79 with SMTP id c15mr1607088bkv.60.1339077506862; Thu, 07 Jun 2012 06:58:26 -0700 (PDT) Received: from DOMYPC (93-141-79-111.adsl.net.t-com.hr. [93.141.79.111]) by mx.google.com with ESMTPS id gm18sm3943227bkc.7.2012.06.07.06.58.23 (version=SSLv3 cipher=OTHER); Thu, 07 Jun 2012 06:58:25 -0700 (PDT) Message-ID: <20120607.135825.592.1@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Thu, 07 Jun 2012 15:58:25 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201206070821.40068.jhb@freebsd.org> References: <20120606.161514.685.1@DOMY-PC> <201206070821.40068.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 13:58:28 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: freebsd-hackers@freebsd.org=0D=0ACc: = rank1seeker@gmail.com=0D=0ADate: Thu, 7 Jun 2012 08:21:39 = -0400=0D=0ASubject: Re: CD bootcode=0D=0A=0D=0A> On Wednesday, June 06, = 2012 12:15:14 pm rank1seeker@gmail.com wrote:=0D=0A> > FreeBSD's CD = bootcode '/boot/cdboot' is targeting stage 3 boot -> loader=0D=0A> > For = example, stage 2 boot '/boot/boot' is attempting the same.=0D=0A> > = =0D=0A> > In my case of a '/boot/loader', '/boot' is a symlink!=0D=0A> > = =0D=0A> > So if '/boot/boot' works with symlinks, why '/boot/cdboot' = doesn't!=0D=0A> > Yes, I did use Rock-Ridge extensions, upon creation of = 'cd.iso'=0D=0A> =0D=0A> Because I didn't make cdboot's lookup routine = handle symlinks. It=0D=0A> also doesn't look at Rock-Ridge extensions = and only uses the base=0D=0A> ISO-9660 directory entries. That was = enough fun to write in assembly.=0D=0A> OTOH, CD sectors are 2k, so you = do have that much room to work with=0D=0A> and can probably fit a more = advanced directory lookup into cdboot.=0D=0A> =0D=0A> I'm happy to review = any patches you come up with.=0D=0A> =0D=0A> -- =0D=0A> John = Baldwin=0D=0A=0D=0A=0D=0AI need to correct myself.=0D=0ABOTH stage 2 boot = '/boot/boot' AND '/boot/cdboot' don't work with = symlinks!=0D=0A=0D=0A'/boot/boot' on UFS sees symlink as file, same as = '/boot/cdboot' does so on Rock-Ridge.=0D=0A=0D=0AI can handle = '/boot/boot' by providing full path to loader via = 'boot.config'=0D=0A'/boot/cdboot' doesn't have such a file, so in = '/usr/src/sys/boot/i386/cdboot/cdboot.s':=0D=0A--=0D=0Aloader_paths: = .asciz "/BOOT/LOADER"=0D=0A .asciz "/boot/loader"=0D=0A = .byte 0=0D=0A--=0D=0A=0D=0AI injected third '.asciz' line = with full path to 'loader' and recompiled it.=0D=0AAnd what is first line = "/BOOT/LOADER" doing in there ?!?=0D=0A=0D=0ABut even when loader is = finally started, loader handles symlinks on UFS (kicked by '/boot/boot'), = BUT fails so, on Rock-Ridge iso (kicked by '/boot/cdboot')=0D=0ALooks = like loader must be made into looking at Rock-Ridge = extensions.=0D=0A=0D=0AI can't provide patches, as I only know 'sh', = 'php' (and web related langs)=0D=0AAbove code I've patched, only because = I've hunted patterns.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6